What is a good naming convention for Unity?

I'm almost a noob with Unity. As a C ++ programmer, Unity's naming conventions bother me a bit. And having OCD ontop from this makes me crazy;)

Objects say a property Transformthat again has a property Position. But these properties should be accessed by writing transform.positionin code using lower case. This is not very intuitive for me. Therefore, I wonder how I can look at it in order to more easily avoid complications. And what conventions should I use to be able to tell everything about the application, quickly looking at the variables.

+4
source share
1 answer

Unity : , (, , ), , . Enum , (). , ClassName, MethodName, myField, myProperty { get; set; }, MyEnum.CaseA... .

, Transform - , Transform Transform GameObject/Component. , Transform Position, Position ( ).

# .NET(MS ), , .NET UpperCase / AND ( , , , ).

, , , . . OCD, , . , , ( ), , , , , 0 , .

, # ; ++, : UpperCaseClassNames, lowerCaseClassNames, underscore_separated, tClassName, ENUMS_IN_UPPER, ... , .

+4

Source: https://habr.com/ru/post/1547241/


All Articles