C#
public class MyCodeStyle : MonoBehaviour {
// Constants: UpperCase SnakeCase
public const int CONSTANT_FIELD = 56;
// Properties: PascalCase
public static MyCodeStyle Instance { get; private set; };
// Events: PascalCase
public event EventHandler OnSomethingHappened;
// Fields: canelCase
private float memberVariable;
// Function Names: PascalCase
private void Awake() {
Instance = this;
DoSomething(10f);
}
// Function Params: camelCase
private void DoSomething(float time) {
// Do Something ...
memberVariable = time + Time.deltaTime;
if (memberVariable > 0) {
// Do something else ...
}
}
}
https://youtu.be/AmGSEH7QcDg