when autoCleanUpPlayerObjects=false, how to locally cleanup?

Options
I am setting autoCleanUpPlayerObjects = false so I can keep objects in the scene, but when my own client disconnects I need to clean up locally. It looks like LocalCleanupAnythingInstantiated(true) in NetworkingPeer would do the trick but that's protected.

What is the correct code necessary to perform the local cleanup that would be otherwise handled by autoCleanUpPlayerObjects?

Comments

  • Tobias
    Options
    We thought: When you choose to skip autocleanup, you would also keep track of the GameObjects to be able to remove/destroy them as needed. So I would actually expect you to know how to do this.
    If LocalCleanupAnythingInstantiated(true) is what you need, go ahead and add a wrapper for that method to the PhotonNetwork class. Or make it public. The code is actually there to be modified if needed :)

    It might make sense to add this to PUN in general. It might show up in one of the next updates.