photonView.find returns null
Options
Comments
-
Hi,
According to NetworkingPeer.GetPhotonView() code (which calls Object.FindObjectsOfType in turn), PhotonView.Find returns null if no active loaded objects found with PhotonView attached with given view id (check A code).
Why you need that method at all?0 -
thanks for your replay
Im creating a multiplayer game and I have two users
user one : creating a gameObject doing photonNetwork.instantiate();
user two: need to find user one gameObject and to modify it.
i find the gameObject user one has created
maybe you have another idea0 -
You do not need to search for object. Attach scripts with handlers which run at different moments of object's lifetime depending on when you want to modify object (like Unity Awake, Start or many different Photon handlers like OnPhotonInstantiate). You can also store reference to object (this.gameObject) from inside the handler for future use instead of modifying object right away.0