How to get player name from OwnerActorNr | PUN2

Viewed 2240

I'm making an online game and when a ball hit by a player hits another player, I want to get that player's name from OwnerActorNr.

photonView.OwnerActorNr

Is it possible to get player information from this number?

1 Answers

You can use PhotonNetwork.Currentroom.GetPlayer(ActorNumber);

It will return the player. You can use the player properties like nickname, etc..

Related