Storing List of Player GameObjects

Options
Hi

Not sure if this is the correct section to post this i cant seem to find an appropriate forum for posting questions.

I'm new to Photon, I've managed to successfully convert from unity built in networking.

I need to store a list of the actual player GameObjects that are instantiated into the game i see there is an api call PhotonNetwork.playerList does this store the actual GameObject that belongs to a player?

Is there some other way i can do this that wouldn't make things too complicated with players disconnecting and the list not being accurate to actual players currently in the game?

Any advise would be appreciated.

Comments

  • vadim
    Options
    Hi,

    Why you need that list?
    You can handle OnPhotonInstantiate message to update such list.
  • Hi

    its for AI to target the players in game I want to try avoid GameObject.FindWIthTag if possible.

    Thanks ill look into OnPhotonInstantiate
  • Math
    Options

    Same here