I came across a bug where, my score in “Game” scene can only accumulate once, this happens when I load the “Game” scene from the “MainMenu” Scene after I press the “Start” button to play. But the score accumulate normally when I played it right off from the “Game” scene, and not when I click on the “Start” button on the MainMenu.
I fixed the bug by deleting all ScoreKeeper gameObjects from other scenes except for in the “MainMenu” scene. Only then the score accumulate as it should no matter where the “Game” scene is loaded from.
My question is, when making a singleton for a gameObject in the hierarchy, do we need to put it in a single Scene only ? and let it persist through every scene from then on ?
Im a bit confused since, we can have an AudioPlayer singleton in every scene in the Hierarchy without any bug.