Find local user as gameobject
Options
Comments
-
thats depends on what are you trying to do. A hard method to do that is something like this:
int myID = PhotonNetwork.player.ID; GameObject[] players; GameObject myPlayer; void Start () { players = GameObject.FindGameObjectsWithTag("Player"); foreach (GameObject player in players){ int playerLoopId = player.GetComponent<PhotonView>().owner.ID; if (playerLoopId == myID){ myPlayer = player; } } Transform whatAreYouTryingToDo = myPlayer.transform; }
maybe you can be more specific about what you want to do with that.0