/* * //今まで一度もトラッキングされたことがないかどうかをチェックする(True=全く位置情報がない, False=過去一度でも位置情報がある) * public bool GetNeverTracked(uint deviceIndex) * { * if (openVR == null) * { * return true; * } * * var error = default(ETrackedPropertyError); * //Prop_NeverTracked_Bool取得 * bool NeverTracked = openVR.GetBoolTrackedDeviceProperty(deviceIndex, ETrackedDeviceProperty.Prop_NeverTracked_Bool, ref error); * if (error != ETrackedPropertyError.TrackedProp_Success) return true; * return NeverTracked; * } */ public bool GetIsSafeMode() { if (openVR == null) { return(false); } CVRSettings cVRSettings = OpenVR.Settings; EVRSettingsError eVRSettingsError = EVRSettingsError.None; bool en = cVRSettings.GetBool(OpenVR.k_pch_SteamVR_Section, OpenVR.k_pch_SteamVR_EnableSafeMode, ref eVRSettingsError); if (eVRSettingsError != EVRSettingsError.None) { Debug.LogError("GetIsSafeMode Failed: " + eVRSettingsError.ToString()); return(false); } return(en); }
// Token: 0x06005ED9 RID: 24281 RVA: 0x00213320 File Offset: 0x00211720 private void OnEnable() { this.usingSpeakers = false; CVRSettings settings = OpenVR.Settings; if (settings != null) { EVRSettingsError evrsettingsError = EVRSettingsError.None; if (settings.GetBool("steamvr", "usingSpeakers", ref evrsettingsError)) { this.usingSpeakers = true; float @float = settings.GetFloat("steamvr", "speakersForwardYawOffsetDegrees", ref evrsettingsError); this.offset = Quaternion.Euler(0f, @float, 0f); } } if (this.usingSpeakers) { SteamVR_Events.NewPosesApplied.Listen(new UnityAction(this.OnNewPosesApplied)); } }
private void OnEnable() { this.usingSpeakers = false; CVRSettings settings = OpenVR.Settings; if (settings != null) { EVRSettingsError eVRSettingsError = EVRSettingsError.None; if (settings.GetBool("steamvr", "usingSpeakers", false, ref eVRSettingsError)) { this.usingSpeakers = true; float @float = settings.GetFloat("steamvr", "speakersForwardYawOffsetDegrees", 0f, ref eVRSettingsError); this.offset = Quaternion.Euler(0f, @float, 0f); } } if (this.usingSpeakers) { SteamVR_Utils.Event.Listen("new_poses_applied", new SteamVR_Utils.Event.Handler(this.OnNewPosesApplied)); } }