FormerlySerializedAs added when renaming a variable

I have a C# script for a Unity project. 

When I try to change a variable name by using Command + R, Rider adds [FormerlySerializedAs()] to the selected variable. 

I understand this is useful in some cases, but I don't want it to happen every time. Is there a way to disable this behavior?

// Before
public float oldName;
// After
[FormerlySerializedAs("oldName")] public float newName;
1
3 comments

Hello Sean,

Thank you for contacting Rider support.

You can adjust.disable this behavior in File | Settings | Languages & Frameworks | Unity Engine | Refactorings.

If it doesn't help or you have any other questions or difficulties, please let me know.

Have a nice day!

2

That did the trick, thanks!

0
Hello Sean,

I am glad to hear that I was able to help you.
Should you have any other questions or difficulties in the future, do not hesitate to contact support.

Have a nice day!
0

Please sign in to leave a comment.