我将PUN 1.22集成到我的Unity3d wp8项目中。它构建正确,但是 PhotonView.Get(this)返回null。它能是什么?
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 :(得分:0)
忘记将PhotonView附加到我的GameObject
解决方案:
this.gameObject.AddComponent<PhotonView>();
photonView = PhotonView.Get(this);