示例#1
0
 void Start()
 {
     if (this.photonView.IsMine)
     {
         LocalVrRig = Instantiate(LocalVrRigPrefab).GetComponent <VrRig>();
     }
     else
     {
         RemoteAvatar = Instantiate(RemoteAvatarPrefab).GetComponent <VrAvatar>();
     }
 }
    private void Awake()
    {
        bool isVR = GameManager.mode == Mode.VR;

        gameObject.SetActive(isVR);

        VrHelper.SetEnabled(true);

        if (instance == null)
        {
            instance = this;
        }
        else if (instance != this)
        {
            Destroy(gameObject);
            return;
        }

        leftController.Setup();
        rightController.Setup();
    }