Major Bug: Alt-Enter fix variable name doesn't add FormerlySerialzedAs for Unity

So I just pretty much destroyed a huge swath of code and had to revert back to an earlier git version because of what I consider to be a pretty major bug/oversight in how Rider works when "fixing" a variable name.

I am porting some old Unity code into a new project that has different naming standards.  I set Rider up for the new naming standards and then started going through files, and using Alt+Enter on the old names ad choosing the suggested "proper" name.  This renames the variable properly as expceted but does NOT add a FormerlySerializedAs() decoration.  Same with if you Alt+Enter and choose to fix it in a larger scope such as all in file.

It appears that Rider only adds the proper decoration if I Refactor->Rename or CTRL + R,R which makes he process infinitely slower as not only do I have to type he new name manually rather than let Rider just give me the proper name under the new rules, but I have to do it for each and every field manually rather than all in file.

Lots of egg on my face after touting how amazing Rider is to my team :(

1 comment
Comment actions Permalink

Hi John! 

Let me try to help you. What is your version of Rider and Unity? Had your variable [SerializeField] attribute? Please, attach a screencast where you reproduce the issue, it'll help a lot. 

Thank you in advance! 


Please sign in to leave a comment.