A few questions about the auto code cleanup (C#, Unity)

1) Currently it's putting the { on a new line which I don't want (not looking to get into a debate about this, its just my personal preference haha). I couldn't find the option to change this, could someone direct me please?

2) Also I noticed by default it changes a lot of my variables to 'var'. I would prefer it didn't and left them as is, but couldn't find where to change this?

3) I am getting some warning yellow underlines in my code, for example I have some private variables which don't start with _ and rider is telling me about this. However the code cleanup is not changing these variables. Is there way to make the cleanup change them?

Any advice appreciated. Thanks!


1 comment
Comment actions Permalink

Hello Mark,

1. You can change braces layout in Preferences | Editor | Code Style | C# | Braces Layout.

2. You can set it in Preferences | Editor | Code Style | C# | Syntax Style.

3. Fixing inconsistent naming is not included in code cleanup because when batch-applied it can lead to naming conflicts.

Let me know if you have other questions.


Please sign in to leave a comment.