About identation with (unity) attributes

This is what I want, a header attr that stay alone in line followed by n field with(out) attr sharing the same line:

But when I add the first field, this is what I got

And after I manually insert an entry and add a new field with or without attribute rider add a line between then


I didn't found s solution in settings, so I came here to ask what settings I need to change.

1 comment
Comment actions Permalink

Try to set up the following:

1. Open Settings page "Preferences (or File | Settings in case of Windows) | Editor | Code Style | C#";

2. Switch to "Blank Lines" tab;

3. Find "Blank Lines in Declaration" section and set 0 value for "Around field";

4. Switch to "Line breaks and wrapping" tab;

4. Find "Arrangement of Attributes" section and set "Never" for "Place field attribute on the same line";


Also, you can disable `Auto-format on semicolon` option on "Preferences | Editor | General | Typing Assistance".


Please sign in to leave a comment.