PhotonNetwork.DestroyPlayerObjects() problems

How do I use PhotonNetwork.DestroyPlayerObjects() I have tried to find out but there isn't a clear guide.

Any amount of help will be appreciated.


  • /// <summary>
    /// Network-Destroy all GameObjects, PhotonViews and their RPCs of this player (by ID). Can only be called on local player (for "self") or Master Client (for anyone).
    /// </summary>
    /// <remarks>
    /// Destroying a networked GameObject includes:
    /// - Removal of the Instantiate call from the server's room buffer.
    /// - Removing RPCs buffered for PhotonViews that got created indirectly with the PhotonNetwork.Instantiate call.
    /// - Sending a message to other clients to remove the GameObject also (affected by network lag).
    /// Destroying networked objects works only if they got created with PhotonNetwork.Instantiate().
    /// Objects loaded with a scene are ignored, no matter if they have PhotonView components.
    /// </remarks>
    /// <returns>Nothing. Check error debug log for any issues.</returns>

    This description should be available in the IDE in best case. Maybe MonoDevelop doesn't show it (it's built for/with Visual Studio).
    In any case: You can destroy all GOs of a user, provided you are this user (network-destroy all your own stuff) or you are the Master Client (the player who's the longest active in the room).

    What is the usecase?