[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.
solved Serializable field in Unity [duplicate]