Hey everyone, I am new to Unity and I have some problems with my global GameObjects as you can see. First of all I’ve made some global GameObjects which used in several scenes becuse it is a local-multiplayer game and I wanted to make the player number settable and that’s why I set active or inactive these global GameObjects(the players) in all maps depend on the player number. This solution works pretty well in editor but if I build and run the game it doesn’t work. I think that in build it doesn’t handle the global GameObjects in that way like in editor but I actually don’t know what’s the problem.
Thank you for your response in advance.
How are you managing the lifecycle of your “Global” gameObjects? Are they rpesent in every one of your scenes? Are they present in some initial loading scene and then added to DontDestroyOnLoad? Are you using a singleton pattern? Are you using multi-scene editing in the editor?
Please provide some more info to help us figure out your issue.
I set all the global gameObjects active in the main menu and then you have some checkboxes which can affect whether the players are active or not. Except the main menu every scene contains these global gameObjects but I don’t know anything about Singleton pattern or multi-scene editing or don’t destroy on load.