Components in Game gameobject

keattikorn

New member
I am developing a game that has multiple scenes using PhotonNetwork.LoadLevel. Each scene contains game objects similar to the demo scene i.e., Game (contains StateManager, KinematicObjectManager etc) , PunGame (cointains PunStateManager etc), etc. The question is when I switch the scene, which of the game objects do I have to keep (Don'tDestroyOnLoad) or need to be reset programmatically, and how?

The problem I am facing at the moment is that the State system does not work from the second scene onwards. It seems it is broken. What do I need to rebind the UCL player with the state system on the second scene?

p.s. I keep the player (DontDestroyOnLoad) at all times from the first scene onwards.
 

Justin

Administrator
Staff member
You should be able to keep the entire Game GameObject as DontDestroyOnLoad. What part of the state system doesn't work?
 

Justin

Administrator
Staff member
I just tried it and it worked after changing scenes. For this I am not persisting the Game components.
 
Top