How do I transfer ownership of a gameObject?

Options
I'm trying to better understand ownership over ID's but I'm not entirely sure how to transfer ownership to another client.

The problem: I have a building system where blocks are placed, but I want ALL players to be able to destroy one another's blocks. My code doesn't do that- obviously. How can I transfer the ownership of the block over to the person trying to destroy it?

Thanks.


Comments

  • jRocket
    Options
    Just call PhotonView.RequestOwnership().

    But you could also just send an RPC to all clients and in that RPC, each client checks PhotonView.IsMine and destroys the block if its theirs.