Rider not inspecting Unity serialize field naming rules
A few days ago, I started fooling around with the JetBrains IDEs, such as loading a Unity solution in Rider for Unreal Engine and see how it behaves. But then, I noticed that in there, in the case of serialized member variables, it marked a warning that said they do not match the private instance field naming rules.

Anyway, I thought this was one of the consequences of doing such thing, so I went back to Rider and noticed that warning was still there. I headed to the settings and made sure the inspection for the serialize field naming rules was enabled, and it was, but it is not working. I even tried changing things like the prefix or the suffix and the rule itself, but it still remained taking the variable as a common instance field.

Also, I set the external default editor in Unity correctly and made sure the plugin for the Rider support in it was up to date.


Please sign in to leave a comment.
Hi Scarrenov!
What Rider version do you use (Help | About) and Unity version? Could you please check this behaviour on a new sample solution?
Also, I'd like to ask you to try the same on the latest Rider EAP.
Thank you!
Alex,
I'm using Rider v2020.2.4 and Unity 2020.11.1. I checked it in a new solution and others I have created and worked with Rider in the past as well, but the problem is still there.
Also tried using the Rider EAP and setting it to be my Unity default external editor and it made no difference.
As a side note, I noticed that tooltips in the EAP only work for warnings, errors and such. They do not show info for methods, variables, parameters or classes as Rider does.
Hi,
thank you for the details. Could you please collect all Rider .DotSettings files:
.DotSettings.userfile near your sln (if any).DotSettingsfile near your sln (if any)GlobalSettingsStorage.DotSettingsfileSample solution also appreciated. You can attach all files privately to a new request via Help | Contact Support or Help | Report a bug or share large files via https://uploads.jetbrains.com/ form.
Hey,
I've uploaded the .DoSettings.user, GlobalSettingsStorage.DotSettings and the one solution and encountered this issue with. I could not find any .DotSettings file in my solution folder. I really appreciate your help.
Upload id: 2020_12_01_Kx4zWcQf1YcSJMcM (files: GlobalSettingsStorage.DotSettings and 2 more)
Hi,
thanks! Please, try to remove the following string from GlobalSettingsStorage.DotSettings:
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=5f0fdb63_002Dc892_002D4d2c_002D9324_002D15c80b22a7ef/@EntryIndexedValue"><Policy><Descriptor Staticness="Any" AccessRightKinds="Any" Description=""><ElementKinds /></Descriptor><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></Policy></s:String>
This is an advanced naming rule that could come e.g. from ReSharper.
I hope this helps!
That seems to do the trick.
I'm good to go. Thank you very much for your help!