Group Group Group Group Group Group Group Group Group Forums

Introducing the C# Style Guide

The Unity Team at has grown a lot in the past year. At this point, we’ve released over 20 free Unity tutorials, and even a brand new Unity book. Now that the team has grown, we want to make sure we keep our style consistent, following the modern C# and Unity conventions developers are […]

This is a companion discussion topic for the original entry at

Hi there

What is the reason to invent your own coding style? Instead of using the Microsoft C# coding style, that people are use to?

/Søren a C# developer-

Hi @thediver !

This style guide conforms with both Microsoft and Unity C# standards as much as possible. Before this, we had a style that was much more like Java.
If there are any exceptions, they’re there to increase readability for the tutorials and books.

Are there any specific points you disagree with?



good stuff like it so far.

But for the switch statement you need to put the “{” in the extra line.
I would also put one empty line between the statements for readability

switch (variable)
case 1:

case 2:


One additional style to think about:
private methods in camelCase.
internal and public methods in PascalCase


This tutorial is more than six months old so questions are no longer supported at the moment for it. We will update it as soon as possible. Thank you! :]