- Home /
Question by
htnchannel05 · Sep 17, 2021 at 11:24 AM ·
instantiate
How do I get the PhotonView IsMine value after instantiate?
I cannot get the IsMine value after instantiatie when other players join the room. It only works when I create the room. And I notice that all the line of codes below the instantiate will not be executed. Is there any ways to fix this? Thanks for your help!
void Start()
{
Spawn();
}
void Spawn(){
GameObject player = PhotonNetwork.Instantiate(Player.name, Vector3.zero, Quaternion.identity);
PhotonView photonView = player.GetComponent<PhotonView>();
print(photonView.IsMine);
}
Comment