Quantcast
Channel: Photon Unity Networking (PUN) — Photon Engine
Viewing all articles
Browse latest Browse all 8947

Transfer ownership from scene to player and back

$
0
0
Yet another ownership question!

So I've got a scene with objects that can be picked up by the player. Objects in the scene by default have "Scene" as their PhotonVIew's owner. To allow the player to pick up an item and move it around I use:

photonView.TransferOwnership(PhotonNetwork.player);

But when the player drops the item I want it the PhotonVIew's owner to change back to "Scene" but I can't find a way to do that? So what do I need to do to set a PhotonVIew's owner to "Scene"?

Viewing all articles
Browse latest Browse all 8947

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>