How do I get my local player's PhotonView?
The whole answer can be found below.
Try Our
Documentation
Please check if you can find an answer in our extensive documentation on PUN.
Join Us
on Discord
Meet and talk to our staff and the entire Photon-Community via Discord.
Read More on
Stack Overflow
Find more information on Stack Overflow (for Circle members only).
How do I get my local player's PhotonView?
tatelax
2015-05-19 03:16:22
I'm trying to get either my local player's PhotonView, or the GameObject that my local player's PhotonView is attached to. I'm surprised I have not found anything online about this. The reason I ask this question is because I have certain UI buttons that exist before my player spawns. Those buttons change variables that are located on my local player.
Thanks,
- Tate
Comments
Still looking for help on this topic. Maybe I have the wrong approach to this concept.
When you call PhotonNetwork.Instantiate(), it will return the GameObject you just created. This is "your GameObject". Or one of yours. You can keep a reference for this GO in your code, if you need to modify it.
Back to top