I recently found out that you can use an .editorconfig file to automatically enforce Formatting and Naming Conventions and I would like to apply Unity’s Recommendations to my config.
Unity’s Style Guide Recommendations:
I am currently using this: UnityEditorConfig/.editorconfig at main · pankaxz/UnityEditorConfig · GitHub
pankaxz’s .editorconfig seems to be made for C# in general and is a decent jumping off point but I was wondering if there was one specific to Unity.
By the way, if anyone is curious about the Steps to implement it as of 2024 for VS Code (It took me a lot of google searching to figure out this could be done), Here they are:
Step 1: Make a Unity Project
Step 2: Open project in File Explorer. Should look like this roughly:
Step 3: Create a file called .editorconfig
Step 4: Open .editorconfig
in text editor
Step 5: Write or Copy-Paste Relevant Code into the file.
Step 6: Done. It should now work. Maybe try restarting Unity if it doesn’t work first try.