PhotonView.Get(this) returns null
I integrate PUN 1.22 to my Unity3d wp8 project. It builds correct, but PhotonView.Get(this) returns null. What can it be?
public static PhotonView Get(Component component)
{
return component.GetComponent<PhotonView>() as PhotonView;
}
public static PhotonView Get(GameObject gameObj)
{
return gameObj.GetComponent<PhotonView>() as PhotonView;
}
public static PhotonView Get(Component component)
{
return component.GetComponent<PhotonView>() as PhotonView;
}
public static PhotonView Get(GameObject gameObj)
{
return gameObj.GetComponent<PhotonView>() as PhotonView;
}
0
Comments
this.gameObject.AddComponent<PhotonView>();
photonView = PhotonView.Get(this);