Im using photon unity networking, and what im need to do is reference my player object from a script on another gameobject. It needs to be my player and not some other users player.
foreach (GameObject go in GameObject.FindGameObjectsWithTag ("Player")) {
if (go.GetComponent<PhotonView>().isMine) {
equipmentScript = GetComponent<EquipmentScript> ();
}
}
I thought this would work but it doesnt, is there any special way to reference MY player?