photon how to destroy object 1

photon how to destroy object

PhotonNetwork.Destroy(gameObject);

Here is what the above code is Doing:
1. We’re checking if the player is the owner of the object.
2. If the player is the owner, we’re destroying the object.
3. If the player is not the owner, we’re sending a request to the owner to destroy the object.

Now, we need to add the following code to the PlayerController script:

Similar Posts