The Photon Forum
is Closed Permanently.

After many dedicated years of service, we have made the decision to retire our Forum and switch to read-only: we´ve saved the best to last! Your search result can be found below. Plus, we offer support via these channels:

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).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

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

tatelax
2015-05-25 21:25:29

Still looking for help on this topic. Maybe I have the wrong approach to this concept.

Tobias
2015-05-26 09:16:25

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