required and serializefield code example
Example: unity serializefield
//Shows the private variable in the Unity Inspector
[SerializeField]
private string name;
//Shows the private variable in the Unity Inspector
[SerializeField]
private string name;