1

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;
}
4

1 に答える 1

1

PhotonView を GameObject にアタッチするのを忘れてください

ソリューション:

this.gameObject.AddComponent<PhotonView>();
photonView = PhotonView.Get(this);
于 2013-10-14T12:57:04.537 に答える