// Token: 0x06000A02 RID: 2562 RVA: 0x0003DF54 File Offset: 0x0003C154 private void Start() { if (XRDevice.isPresent) { this.pcControls.SetActive(false); this.controlsImage.gameObject.SetActive(true); this.resetButton.interactable = false; VRTK_DeviceFinder.Headsets headsetType = VRTK_DeviceFinder.GetHeadsetType(true); if (headsetType == VRTK_DeviceFinder.Headsets.OculusRift) { this.controlsImage.sprite = this.oculusRiftSprite; return; } if (headsetType == VRTK_DeviceFinder.Headsets.Vive) { this.controlsImage.sprite = this.htcViveSprite; return; } Debug.LogError(string.Concat(new object[] { "Device not found for controls: ", XRDevice.model, " : ", VRTK_DeviceFinder.GetHeadsetType(true) })); this.controlsImage.sprite = this.oculusRiftSprite; } }
// Token: 0x06001344 RID: 4932 RVA: 0x0006BCD4 File Offset: 0x00069ED4 protected virtual string GetControllerStartMenuPath(SDK_BaseController.ControllerHand hand, string suffix) { VRTK_DeviceFinder.Headsets headsetType = VRTK_DeviceFinder.GetHeadsetType(true); if (headsetType != VRTK_DeviceFinder.Headsets.OculusRift) { return(null); } return(((hand == SDK_BaseController.ControllerHand.Left) ? "enter_button" : "home_button") + suffix); }
// Token: 0x06001342 RID: 4930 RVA: 0x0006BC54 File Offset: 0x00069E54 protected virtual string GetControllerButtonTwoPath(SDK_BaseController.ControllerHand hand, string suffix) { VRTK_DeviceFinder.Headsets headsetType = VRTK_DeviceFinder.GetHeadsetType(true); if (headsetType == VRTK_DeviceFinder.Headsets.OculusRift) { return(((hand == SDK_BaseController.ControllerHand.Left) ? "y_button" : "b_button") + suffix); } if (headsetType == VRTK_DeviceFinder.Headsets.Vive) { return("button" + suffix); } return(null); }
// Token: 0x06001340 RID: 4928 RVA: 0x0006BBE8 File Offset: 0x00069DE8 protected virtual string GetControllerTouchpadPath(SDK_BaseController.ControllerHand hand, string suffix) { VRTK_DeviceFinder.Headsets headsetType = VRTK_DeviceFinder.GetHeadsetType(true); if (headsetType == VRTK_DeviceFinder.Headsets.OculusRift) { return("thumbstick" + suffix); } if (headsetType == VRTK_DeviceFinder.Headsets.Vive) { return("trackpad" + suffix); } return(null); }
// Token: 0x0600133F RID: 4927 RVA: 0x0006BBA8 File Offset: 0x00069DA8 protected virtual string GetControllerGripPath(SDK_BaseController.ControllerHand hand, string suffix, SDK_BaseController.ControllerHand forceHand) { VRTK_DeviceFinder.Headsets headsetType = VRTK_DeviceFinder.GetHeadsetType(true); if (headsetType == VRTK_DeviceFinder.Headsets.OculusRift) { return("grip" + suffix); } if (headsetType == VRTK_DeviceFinder.Headsets.Vive) { return(((forceHand == SDK_BaseController.ControllerHand.Left) ? "lgrip" : "rgrip") + suffix); } return(null); }
// Token: 0x06001320 RID: 4896 RVA: 0x0006B3E0 File Offset: 0x000695E0 public override SDK_BaseController.ControllerType GetCurrentControllerType() { VRTK_DeviceFinder.Headsets headsetType = VRTK_DeviceFinder.GetHeadsetType(true); if (headsetType == VRTK_DeviceFinder.Headsets.OculusRift) { return(SDK_BaseController.ControllerType.SteamVR_OculusTouch); } if (headsetType == VRTK_DeviceFinder.Headsets.Vive) { return(SDK_BaseController.ControllerType.SteamVR_ViveWand); } return(SDK_BaseController.ControllerType.Custom); }
// Token: 0x06001326 RID: 4902 RVA: 0x0006B620 File Offset: 0x00069820 public override Transform GenerateControllerPointerOrigin(GameObject parent) { VRTK_DeviceFinder.Headsets headsetType = VRTK_DeviceFinder.GetHeadsetType(true); if (headsetType == VRTK_DeviceFinder.Headsets.OculusRift && (this.IsControllerLeftHand(parent) || this.IsControllerRightHand(parent))) { GameObject gameObject = new GameObject(parent.name + " _CustomPointerOrigin"); gameObject.transform.SetParent(parent.transform); gameObject.transform.localEulerAngles = new Vector3(40f, 0f, 0f); gameObject.transform.localPosition = new Vector3(this.IsControllerLeftHand(parent) ? 0.0081f : -0.0081f, -0.0273f, -0.0311f); return(gameObject.transform); } return(null); }
// Token: 0x06001321 RID: 4897 RVA: 0x0006B404 File Offset: 0x00069604 public override string GetControllerDefaultColliderPath(SDK_BaseController.ControllerHand hand) { string result = "ControllerColliders/Fallback"; VRTK_DeviceFinder.Headsets headsetType = VRTK_DeviceFinder.GetHeadsetType(true); if (headsetType != VRTK_DeviceFinder.Headsets.OculusRift) { if (headsetType == VRTK_DeviceFinder.Headsets.Vive) { result = "ControllerColliders/HTCVive"; } } else { result = ((hand == SDK_BaseController.ControllerHand.Left) ? "ControllerColliders/SteamVROculusTouch_Left" : "ControllerColliders/SteamVROculusTouch_Right"); } return(result); }
// Token: 0x060007FD RID: 2045 RVA: 0x0002FC68 File Offset: 0x0002DE68 private void Start() { if (FileBasedPrefs.GetInt("isTutorial", 0) == 1) { GameController.instance.OnGhostSpawned.AddListener(new UnityAction(this.GhostSpawned)); GameController.instance.isTutorial = true; this.missionWhiteBoard.SetActive(false); this.tutorialWhiteBoard.SetActive(true); SetupPhaseController.instance.BeginHuntingPhase(); this.tvLight.enabled = true; this.tvLight.intensity = 0.4f; this.trainingTVCanvas.gameObject.SetActive(true); Object.Destroy(this.tvRemote); this.trainingRemote.enabled = true; for (int i = 0; i < this.probes.Length; i++) { this.probes[i].RenderProbe(); } for (int j = 0; j < this.slides.Length; j++) { this.slides[j].SetActive(false); } this.slides[0].SetActive(true); if (XRDevice.isPresent) { this.VRControls.SetActive(true); VRTK_DeviceFinder.Headsets headsetType = VRTK_DeviceFinder.GetHeadsetType(true); if (headsetType == VRTK_DeviceFinder.Headsets.OculusRift) { this.OculusControls.SetActive(true); return; } if (headsetType == VRTK_DeviceFinder.Headsets.Vive) { this.ViveControls.SetActive(true); return; } } else { this.NonVRControls.SetActive(true); } } }
// Token: 0x06001BB7 RID: 7095 RVA: 0x00090D4C File Offset: 0x0008EF4C public static VRTK_DeviceFinder.Headsets GetHeadsetType(bool summary = false) { VRTK_DeviceFinder.Headsets headsets = VRTK_DeviceFinder.Headsets.Unknown; VRTK_DeviceFinder.cachedHeadsetType = ((VRTK_DeviceFinder.cachedHeadsetType == "") ? XRDevice.model.Replace(" ", "").Replace(".", "").ToLowerInvariant() : VRTK_DeviceFinder.cachedHeadsetType); string text = VRTK_DeviceFinder.cachedHeadsetType; uint num = < PrivateImplementationDetails >.ComputeStringHash(text); if (num <= 1636145679U) { if (num <= 151693739U) { if (num != 16182461U) { if (num == 151693739U) { if (text == "index") { headsets = (summary ? VRTK_DeviceFinder.Headsets.Vive : VRTK_DeviceFinder.Headsets.index); } } } else if (text == "hpwindowsmixedrealityheadset0") { headsets = (summary ? VRTK_DeviceFinder.Headsets.Vive : VRTK_DeviceFinder.Headsets.HPWMR); } } else if (num != 797153218U) { if (num == 1636145679U) { if (text == "oculusriftcv1") { headsets = (summary ? VRTK_DeviceFinder.Headsets.OculusRift : VRTK_DeviceFinder.Headsets.OculusRiftCV1); } } } else if (text == "samsungwindowsmixedreality800zba0") { headsets = (summary ? VRTK_DeviceFinder.Headsets.Vive : VRTK_DeviceFinder.Headsets.samsungOdyssey); } } else if (num <= 2100718906U) { if (num != 1667887968U) { if (num == 2100718906U) { if (text == "vive_promv") { headsets = (summary ? VRTK_DeviceFinder.Headsets.Vive : VRTK_DeviceFinder.Headsets.VivePro); } } } else if (text == "oculusquest") { headsets = (summary ? VRTK_DeviceFinder.Headsets.OculusRift : VRTK_DeviceFinder.Headsets.OculusQuest); } } else if (num != 2733032458U) { if (num != 2947161482U) { if (num == 4142758193U) { if (text == "vivedvt") { headsets = (summary ? VRTK_DeviceFinder.Headsets.Vive : VRTK_DeviceFinder.Headsets.ViveDVT); } } } else if (text == "oculusrifts") { headsets = (summary ? VRTK_DeviceFinder.Headsets.OculusRift : VRTK_DeviceFinder.Headsets.OculusRiftS); } } else if (text == "vivemv") { headsets = (summary ? VRTK_DeviceFinder.Headsets.Vive : VRTK_DeviceFinder.Headsets.ViveMV); } if (headsets == VRTK_DeviceFinder.Headsets.Unknown) { VRTK_Logger.Warn(string.Format("Your headset is of type '{0}' which VRTK doesn't know about yet. Please report this headset type to the maintainers of VRTK." + (summary ? " Falling back to a slower check to summarize the headset type now." : ""), VRTK_DeviceFinder.cachedHeadsetType)); if (summary) { if (VRTK_DeviceFinder.cachedHeadsetType.Contains("rift") || VRTK_DeviceFinder.cachedHeadsetType.Contains("oculus")) { return(VRTK_DeviceFinder.Headsets.OculusRift); } if (VRTK_DeviceFinder.cachedHeadsetType.Contains("vive")) { return(VRTK_DeviceFinder.Headsets.Vive); } if (VRTK_DeviceFinder.cachedHeadsetType.Contains("samsungwindowsmixedreality")) { return(VRTK_DeviceFinder.Headsets.samsungOdyssey); } } } return(headsets); }