PhotonView.Get(this) возвращает ноль

Я интегрирую 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;
}

person Vladislav    schedule 14.10.2013    source источник


Ответы (1)


Просто забудьте прикрепить PhotonView к моему GameObject.

Решение:

this.gameObject.AddComponent<PhotonView>();
photonView = PhotonView.Get(this);
person Vladislav    schedule 14.10.2013