githubEdit

The C# Style Guide

This style guide is based on this other C# style guidearrow-up-right and expands upon it.

You can use whatever file editor you want, but Visual Studioarrow-up-right is probably the most popular and recommended choice. It's free, has many features, and integrates well with Unity and Git.

If you're a student, we recommend getting a copy of JetBrain's Riderarrow-up-right which adds a lot of code hints and shortcuts that will significantly improve your code quality.

Our overarching goals are clarity, readability and simplicity. Also, this guide is written to keep Unity in mind.

Inspiration

This style guide is based on C# and Unity conventions, and discussions within the development team.

Automation

We recently added an EditorConfigarrow-up-right file to automate the code review process, it is a file you can add to Visual Studioarrow-up-right or Riderarrow-up-right and it will apply the formatting and style we use to your analyzers, telling you when something is out of order.

Last updated

Was this helpful?