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.

Getting my PlayerID

galaxytroep
2021-04-25 22:21:06

I know you can select players by joining order with PhotonNetwork.PlayerList() and do something with that..
But how do I get my ID exactly?

I am making a cardgame and I want to know the first player that joined. So that player can play his turn first.

Thanks in advance!

Comments

Ravindra5337
2021-04-26 07:57:24

you can use PhotonNetwork.LocalPlayer.ActorNumber to get the current player id.

Back to top