[HELP] PhotonMessageInfo.photonView null when using OnPhotonInstantiate
Options
I have no idea what's going on.
I have a prefab with a photon view on it and a script that uses OnPhotonInstantiate.
The method is being called, however the photonView stored within the info parameter is null!
Should this not return the photonView on the prefab?
I greatly appreciate any responses! I'm desperate for answers...
I have a prefab with a photon view on it and a script that uses OnPhotonInstantiate.
The method is being called, however the photonView stored within the info parameter is null!
Should this not return the photonView on the prefab?
I greatly appreciate any responses! I'm desperate for answers...
0
Comments
-
bazz_boyy said:
I have no idea what's going on.
I have a prefab with a photon view on it and a script that uses OnPhotonInstantiate.
The method is being called, however the photonView stored within the info parameter is null!
Should this not return the photonView on the prefab?
I greatly appreciate any responses! I'm desperate for answers...
Tell me what you need specifically from OnPhotonInstantiate get? What data. Then I will show you an example0 -
Actually looking back this whole thing is silly, why am I trying to get the photonView on my object from the PhotonMessageInfo parameter when there's a cached reference to the photon view?
Sorry for wasting your time.
0 -
Everything is fine) I never regretted that I was spending my time living on the development in PUN and for discussion of the PUN))bazz_boyy said:
Sorry for wasting your time.
Here is an example of how to access this variable of the data type of a PhotonMessageInfo -void OnPhotonInstantiate(PhotonMessageInfo info) { if(info.sender.IsLocal) // Then who created the prefab, its owner, receives in this condition = true info.sender.SetCustomProperties or info.sender.CustomProperties }
0