[BUG] Destroyed Scene Objects come back after rejoin
Options
Xefier
✭
Photon PUN 2 (4.1.2.14)
Unity 2018.3.12f1
Repro steps
Unity 2018.3.12f1
Repro steps
- 2 Players transition from Scene1 to Scene2 (Automatically sync scene)
- Master client spawns various scene objects
- Both players transition from Scene2 to Scene1 where everything is as expected
- Non-Master rejoins the same room and all the objects spawned in Scene2 are visible in Scene1
0
Comments
-
Should your third repro step read "Both players transition from Scene2 to Scene1 where everything is as expected"?0
-
Oops yes, fixed.0
-
Known Issues
When you load a new scene, all instantiated GameObjects are destroyed only locally but not on the server. Anyone who joins the room later on still creates those GOs. To work around this, PhotonNetwork.Destroy your instantiated game objects before loading a new scene. Or use: PhotonNetwork.RemoveAllInstantiatedObjects(player).
https://forum.unity.com/threads/photon-unity-networking.101734/0 -
What about PhotonNetwork.DestroyAll?
Or does that break scene syncing.0 -
Sorry...above my pay grade.
I don't know. I had just remembered reading about this,0 -
Tested and seems to work fine.
Thank you for the help.
I hope they release an official fix soon though.0