Search Unity

Third Party Find your player[PHOTON]

Discussion in 'Multiplayer' started by Moddwyn, Apr 5, 2017.

  1. Moddwyn

    Moddwyn

    Joined:
    Jan 27, 2016
    Posts:
    49
    Theres gonna be multiple players in your hierarchy, how do I find my player in the hierarchy?
     
  2. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,066
    You could store "your player" when you Instantiate it. Instantiate returns the GO which is created.
    Or you can cycle through all objects and figure out which one is the type you look for and controlled by your client. Check PhotonView.IsMine, e.g..