// Start is called before the first frame update void Start() { oVRCameraRig = this.gameObject.GetComponent <OVRCameraRig>(); oVRManager = this.gameObject.GetComponent <OVRManager>(); oVRHeadsetEmulator = this.gameObject.GetComponent <OVRHeadsetEmulator>(); viewpointCamera = this.gameObject.GetComponent <Camera>(); }
// Start is called before the first frame update void Start() { oVRCameraRig = this.gameObject.GetComponent <OVRCameraRig>(); oVRManager = this.gameObject.GetComponent <OVRManager>(); oVRHeadsetEmulator = this.gameObject.GetComponent <OVRHeadsetEmulator>(); currentTreasureIndex = 0; foreach (CollectibleTreasure treasure in treasureItems) { treasure.gameObject.active = false; } treasureItems[currentTreasureIndex].gameObject.active = true; }
private void Start() { roomSceneManager = (RoomSceneManager)NetworkRoomManagerExt.singleton.sceneManager; roomSceneManager.SetPlayer(this); if (isLocalPlayer) { NetworkRoomManagerExt.singleton.roomPlayer = this; rig.AddComponent <OVRCameraRig>(); OVRManager ovrmanager = rig.AddComponent <OVRManager>(); ovrmanager.trackingOriginType = OVRManager.TrackingOrigin.FloorLevel; ovrHeadsetEmulator = rig.AddComponent <OVRHeadsetEmulator>(); ovrHeadsetEmulator.opMode = OVRHeadsetEmulator.OpMode.AlwaysOn; Camera cameraComponent = camera.AddComponent <Camera>(); camera.AddComponent <AudioListener>(); camera.tag = "MainCamera"; cameraComponent.nearClipPlane = 0.2f; // cameraComponent.nearClipPlane = 0.45f; cameraComponent.cullingMask = ~(1 << 9); for (int i = 0; i < models.Length; i++) { models[i].layer = 9; } body.tag = "Player"; for (int i = 0; i < hands.Length; i++) { hands[i].tag = "Hand"; } //StartCoroutine(cDoWaitTime(1f,()=> //{ // gameObject.AddComponent<OVRPlayerController>(); // gameObject.AddComponent<OVRSceneSampleController>(); //})); CmdSetPlayerZeroPos(PlayerPrefs.GetFloat("PlayerYZeroPos")); } rig.SetActive(true); }
// Start is called before the first frame update void Start() { playSceneManager = (PlaySceneManager)NetworkRoomManagerExt.singleton.sceneManager; if (isLocalPlayer) { rig.AddComponent <OVRCameraRig>(); OVRManager ovrmanager = rig.AddComponent <OVRManager>(); ovrmanager.trackingOriginType = OVRManager.TrackingOrigin.FloorLevel; ovrHeadsetEmulator = rig.AddComponent <OVRHeadsetEmulator>(); ovrHeadsetEmulator.opMode = OVRHeadsetEmulator.OpMode.AlwaysOn; Camera cameraComponent = camera.AddComponent <Camera>(); // camera.AddComponent<AudioListener>(); camera.tag = "MainCamera"; camera.AddComponent <OVRScreenFade>(); // cameraComponent.nearClipPlane = 0.45f; cameraComponent.cullingMask = ~(1 << 9); for (int i = 0; i < models.Length; i++) { models[i].layer = 9; } body.tag = "Player"; for (int i = 0; i < hands.Length; i++) { hands[i].tag = "Hand"; } playSceneManager.SetPlayer(this); CmdSetPlayerZeroPos(PlayerPrefs.GetFloat("PlayerYZeroPos")); } playSceneManager.players.Add(this); rig.SetActive(true); }