Why is the master client destoying children but the other clients are destroying parent game objects

I have several Scene Objects that destroy themselves after they do a thing. The script is on a child of the object that needs to be destroyed. Both the parent and the child object have Photon Views. These are Scene Objects so it is up to the Master Client to destroy them.

I look for the parent Photon View ID and use PhotonNetwork.Destroy.

This works great on all of the clients. For some reason, the master destroys the child and leaves the parent object.
while (condition == true)
	{
            //Do something
            //When done, break out of the loop
	}
            int viewID = GetComponentInParent<PhotonView>().ViewID;
            this.photonView.RPC("RPC_ForceMasterClientReplaceStumpWithAshes", RpcTarget.MasterClient, viewID);

[PunRPC]
    void RPC_ForceMasterClientReplaceStumpWithAshes(int viewID)
    {
        Debug.Log("RPC destroy stump ViewID: " + viewID);
        PhotonNetwork.Destroy(PhotonView.Find(viewID).gameObject);
        PhotonNetwork.InstantiateSceneObject("Ashes", transform.parent.position, transform.parent.rotation);
    }

Answers

  • I just use the following to destroy parents and it works pretty well so far. Worth a try.
    PhotonNetwork.Destroy(gameObject.transform.parent.gameObject);
  • Before trying to sort out what is going on, need some more info.

    You show an empty while loop... is that supposed to be empty?

    You say you are destroying the child view object explicitly. Are you expecting this to automatically destroy the root view object?