unity show in inspector code example
Example: unity how to show a private variable in inspector
//Will Show class in the inspector
[System.Serializable]
public class MyClass{
}
public class otherClass{
}
public MyClass thatClass; //will show
public otherClass thatotherClass; //will NOT show
public int public_int; // will show beacuse it's an public variable
private int private_int; // will NOT show beacuse it's an private variable
[SerializeField]
private private_int2; // will show beacuse it has an Serialize Field
protected int protValue; // will not show.