In this blog we will explain some naming conventions at the moment of write code in C# for Unity.
in the next sections i will explain some naming conventions and some recommendations to use in Unity 2021
The camelCase is one of the most used naming convention. In this case the first letter of the first word is in lower case and the first letter of every subsequent word is an uppercase, in the image above you can see an example.
In unity is recommended to use camelCase for properties and private variables.
In this case the first letter of every word is an upper case. This naming convenction is also one of the must used to code in Unity
It is used for naming new methods and for public elements in Unity.
This a convention used mostly for Python, in this convention each space is replaced by an underscore. Is very rare to see someone using this naming convention for Unity.
IIs not used very often. But is another convention that you can take into account. For this naming convention you have to replace all the spaces with a hyphen..
6. Recommendation for Unity
In the upper sections I showed you some naming conventions and how they are use in Unity, at this point, is your election which one you will use. Indepently which one you will use in your project, you have to be consistent from the beginnig util the end.
In the upper image you can find some final recommendations to implement at the moment to start your code in Unity.