Scene Objects not Destroyed
Options
kamend
✭
Hi,
I have the following problem, the MasterClient is creating Bots with "InstantiateSceneObject", but when I call PhotonNetwork.Disconnect(), the created GameObjects does not get Destroyed (on both the MasterClient and the other player), do I need to destroy them myself using GameObject.Destroy? :idea: :?:
I am using PUN 1.5.1
Thanks!
I have the following problem, the MasterClient is creating Bots with "InstantiateSceneObject", but when I call PhotonNetwork.Disconnect(), the created GameObjects does not get Destroyed (on both the MasterClient and the other player), do I need to destroy them myself using GameObject.Destroy? :idea: :?:
I am using PUN 1.5.1
Thanks!
0
Comments
-
I'm having this same problem! I posted about this days ago and haven't received a response.0
-
Additionally, this happens when I leave a room (Scene Objects are not destroyed).0
-
Just did a quick test, and indeed, using InitiateWithSceneObject seemingly doesn't clean up after itself. Did it ever? I've never used it to be honest.0
-
Yes it's worked for over a year now. This 1.51 version made it stop working.0
-
bump - I don't want this to get buried and not resolved. This is a pretty serious problem.0
-
Sorry for the late reply. We've been on Vacation over the Holidays. Actually, I am not yet at work again.
I will take a look if things changed with the last update. It's possible.
Do you have autocleanup turned on (default)?0 -
Hi Tobias,
This is what I have,before connecting
PhotonNetwork.autoCleanUpPlayerObjects = true;
Happy new year and keep up the good work on PUN!
Kamen0 -
Then I will have to take a look.
This issue applies to objects created with InstantiateSceneObject and not to objects loaded with the scene, right? Or both?
Anyone affected should also try opening all scenes in the Editor and saving them when the PhotonViews got updated. We had to change the internals a bit and Unity stores some values in the scene, so those need to be re-saved.0 -
Tobias,
Yeah it seems to be Scene objects only.
You can duplicate this by doing the following:
- Create a room
- Instantiate Scene Object
- Leave room
This is what the photon view looks like in the inspector:
0 -
This should be the same topic:
viewtopic.php?f=17&t=5514&p=21239#p21239
I have a fix and will update PUN next week.
It's not a one-liner, so it's unwieldy for posting here.0 -
Unity can take a while to approve a package update. Any way of having you post the package here? (or linked somehow).0
-
I will get in touch.0
-
We missed each other in Skype, it seems.
I uploaded the new version here:
https://db.tt/9LVTqE5J
Let me know if I missed anything. As far as I can see, this works well with InstantiateScene, Destroy, etc..0 -
Tobias wrote:We missed each other in Skype, it seems.
I uploaded the new version here:
https://db.tt/9LVTqE5J
Let me know if I missed anything. As far as I can see, this works well with InstantiateScene, Destroy, etc..
This looks like it's working. Thanks!
-Carmine0 -
Works on my side too, thanks!
Kamen0 -
Thanks for the feedback, both. Good to know for release.0