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;

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!


That did the trick, thanks!

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!

Please sign in to leave a comment.