Scene Objects not Destroyed

Options
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!

Comments

  • carmine
    Options
    I'm having this same problem! I posted about this days ago and haven't received a response.
  • carmine
    Options
    Additionally, this happens when I leave a room (Scene Objects are not destroyed).
  • 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.
  • carmine
    Options
    Yes it's worked for over a year now. This 1.51 version made it stop working.
  • carmine
    Options
    bump - I don't want this to get buried and not resolved. This is a pretty serious problem.
  • Tobias
    Options
    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)?
  • kamend
    Options
    Hi Tobias,
    This is what I have,before connecting

    PhotonNetwork.autoCleanUpPlayerObjects = true;

    Happy new year and keep up the good work on PUN!

    Kamen
  • Tobias
    Options
    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.
  • carmine
    Options
    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:
  • Tobias
    Options
    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.
  • carmine
    Options
    Unity can take a while to approve a package update. Any way of having you post the package here? (or linked somehow).
  • Tobias
    Options
    I will get in touch.
  • carmine
    Options
    Tobias wrote:
    I will get in touch.

    Monday night is my usual beta-test night. Any chance of getting that fix in?

    -Carmine
  • Tobias
    Options
    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..
  • carmine
    Options
    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!

    -Carmine
  • kamend
    Options
    Works on my side too, thanks!

    Kamen
  • Tobias
    Options
    Thanks for the feedback, both. Good to know for release.