Hello, I am making a 2D remake of an old arcade game. In doing so, the first scene creates a GameObject called GameManager. This script is responsible for keeping track of what level the player is on, playing the in-game sound track, exiting the game, and loading between scenes. I am using the new Unity5 GUI system, rigging the button to the game object, and then calling the desired function.
I created a prefab for the GameManager and placed one in each scene, so that i can rig the buttons up the way I like. And then the GameManager has script that will not let multiple GameManagers exist at the same time. This seems to be my downfall. The scene’s GUI is rigged to GameManager(B), when GameManager(A) loads that scene GameManager(B) is deleted because GameManager(A) exists. And now the GUI rigged that was rigged to GameManager(B) is not calling GameManager(A)'s functions and is not working…
Anyone know the best way to get around this problem is?