How to get photon player transform
Options
Hello, I'm trying to make a void that returns the player transform by the passed "UserID" when its called, Any ideas how to achieve that?
i did this but i don't have any idea about how to get the transform
i did this but i don't have any idea about how to get the transform
public Player GetPlayer(string playerID) { foreach (PhotonPlayer player in PhotonNetwork.playerList) { if (player.UserId == playerID) { Debug.Log("User with playerID of " + playerID + " is found and his name is " + player.NickName); //RETURN PLAYER CLASS -> return transform.GetComponent<Player>(); } } }
0