[ad_1]
[Serializable]
private GameObject gameobject;
[System.Serializable]
private int timer;
The serializable field works like a public variable except that you can using it for a private variable. Some people just use a public variable but a serializable private variable works the same.
[ad_2]
solved Serializable field in Unity [duplicate]