Quantcast
Channel: Questions in topic: "dontdestroyonload"
Viewing all articles
Browse latest Browse all 416

Multiplayer shows different scenes

$
0
0
My problem is that whenever a player switchen to a different scene, he can still see all the other players from the previous scene walking around and the other player can see him, although they are in different scenes. This is most likely due to the DontDestroyOnLoad on the player gameobjects. I tried the following thing to prevent it without success: 1. Account[] allPlayer = FindObjectsOfType (); foreach(Account temp in allPlayer) { if(temp.gameObject.scene != gameObject.scene) { Destroy(temp.gameObject); } } 2. if (!isLocalPlayer) return; DontDestroyOnLoad(gameObject); 3: Making different Network Managers.

Viewing all articles
Browse latest Browse all 416

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>