protected override void LoadSettings() { _gearVRSettings = GetSettingsForDeviceFamily(TBOculusSettings.OculusDeviceFamily.GearVR); _questSettings = GetSettingsForDeviceFamily(TBOculusSettings.OculusDeviceFamily.Quest); _goSettings = GetSettingsForDeviceFamily(TBOculusSettings.OculusDeviceFamily.Go); _riftSettings = GetSettingsForDeviceFamily(TBOculusSettings.OculusDeviceFamily.Rift); _loadedSettings = true; }
protected void ShowFixedFoveatedRenderingOptions(ref TBOculusSettings.TBCoreSettingsOculus subplatform) { EditorGUI.BeginDisabledGroup(!TBOculusSettings.SupportsFixedFoveatedRendering(_selectedDeviceFamily)); if (TBOculusSettings.SupportsFixedFoveatedRendering(_selectedDeviceFamily)) { subplatform.fixedFoveatedRenderingLevel = (TBOculusSettings.FixedFoveatedRenderingLevel)EditorGUILayout.EnumPopup(new GUIContent("Fixed Foveated Rendering", "FFR amount (Go / Santa Cruz only)."), subplatform.fixedFoveatedRenderingLevel); } else { EditorGUILayout.LabelField("Fixed Foveated Rendering", "Not Supported"); } EditorGUI.EndDisabledGroup(); }
protected void ShowRefreshRateOptions(ref TBOculusSettings.TBCoreSettingsOculus subplatform) { EditorGUI.BeginDisabledGroup(!TBOculusSettings.SupportsMultipleRefreshRates(_selectedDeviceFamily)); TBOculusSettings.TBOculusMobileRefreshRate refreshRate = (TBOculusSettings.TBOculusMobileRefreshRate)subplatform.displaySettings.refreshRate; if (TBOculusSettings.SupportsMultipleRefreshRates(_selectedDeviceFamily)) { refreshRate = (TBOculusSettings.TBOculusMobileRefreshRate)EditorGUILayout.EnumPopup(new GUIContent("Refresh Rate", "Choose target refresh rate (Go only)."), refreshRate); subplatform.displaySettings.refreshRate = (TBSettings.TBRefreshRate)refreshRate; } else { EditorGUILayout.LabelField("Refresh Rate", subplatform.displaySettings.refreshRate.ToString()); } EditorGUI.EndDisabledGroup(); }
protected void ShowDynamicResolutionOptions(ref TBOculusSettings.TBCoreSettingsOculus subplatform) { EditorGUI.BeginDisabledGroup(!TBOculusSettings.SupportsDynamicResolution(_selectedDeviceFamily)); if (TBOculusSettings.SupportsDynamicResolution(_selectedDeviceFamily)) { subplatform.useDynamicResolution = EditorGUILayout.BeginToggleGroup(new GUIContent("Enable Adaptive Resolution", "Adjust resolution to maintain performance (Rift / PC only)."), subplatform.useDynamicResolution); } else { EditorGUILayout.LabelField("Enable Adaptive Resolution", "Not Supported"); } subplatform.dynamicResolutionRange.x = EditorGUILayout.Slider(new GUIContent("Minimum Renderscale", "Lowest renderscale allowed by dynamic resolution."), subplatform.dynamicResolutionRange.x, 0.1f, 1.9f); subplatform.dynamicResolutionRange.y = EditorGUILayout.Slider(new GUIContent("Maximum Renderscale", "Highest renderscale allowed by dynamic resolution."), subplatform.dynamicResolutionRange.y, 0.1f, 1.9f); if (TBOculusSettings.SupportsDynamicResolution(_selectedDeviceFamily)) { EditorGUILayout.EndToggleGroup(); } EditorGUI.EndDisabledGroup(); }
protected void ShowSettingsForSubplatform(ref TBOculusSettings.TBCoreSettingsOculus subplatform) { ShowDisplaySettings(ref subplatform.displaySettings); if (_selectedDeviceFamily == TBOculusSettings.OculusDeviceFamily.Rift) { StartSettingsSection(); subplatform.allowViveEmulation = GUILayout.Toggle(subplatform.allowViveEmulation, new GUIContent("Support Vive through Oculus Utilities", "Use Oculus Utilities for Vive support if Steam VR plugin is not installed.")); EndSettingsSection(); } StartSettingsSection(); EditorGUILayout.LabelField("Oculus Rendering Options", TBEditorStyles.h2); ShowFixedFoveatedRenderingOptions(ref subplatform); ShowRefreshRateOptions(ref subplatform); ShowDynamicResolutionOptions(ref subplatform); EndSettingsSection(); ShowQualitySettings(ref subplatform.displaySettings.qualitySettings); }