unity serializefield name code example
Example 1: unity serializefield
//Shows the private variable in the Unity Inspector
[SerializeField]
private string name;
Example 2: unity no serializefield
[System.NonSerialized]
public int Num = 5;
//Shows the private variable in the Unity Inspector
[SerializeField]
private string name;
[System.NonSerialized]
public int Num = 5;