Beginner_
Beginner_

Reputation: 695

How to get player name from OwnerActorNr | PUN2

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?

Upvotes: 2

Views: 3230

Answers (1)

Amit
Amit

Reputation: 36

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

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

Upvotes: 2

Related Questions