Errors when re opening a room
Options
Hello, this question doesn't really have anything to do with pure code. I have a tank game. I can create rooms with any number of players and everything works at the first game. When the game is done though, the player as to click on a leave button. This button disconnect the player altogether from photon, send him back to the room screen, and reconnect him back to photon in order to display the rooms. Then, (after having done a party) when I'm trying to create a new one, i have a few errors popping up telling me scripts have been destroyed. Maybe I did destroy them at one point (big project) but everything should be resetting when disconnecting from photon, changing scenes etc right?So i don't really understand why do I have to re start my game to be able to start a party without errors. Could it be any cache issues or something?
Thank you.
Thank you.
0
Comments
-
I've understood that the problem is that when I'm changing of scene, my tank (with all views) is destroyed thus, causing problems.0
-
I can't understand how can i avoid my tank being destroyed between scene changes? And is that even a thing?0
-
Bump up, I can share my project if needed0
-
I just found out, always add your raise event listener on awake, and ALWAYS remove on in an OnDestroy function1