public static void DrawTargetDeviceInspector(OVRProjectConfig projectConfig)
    {
        bool hasModified = false;

        // Target Devices
        EditorGUILayout.LabelField("Target Devices", EditorStyles.boldLabel);

        foreach (OVRProjectConfig.DeviceType deviceType in System.Enum.GetValues(typeof(OVRProjectConfig.DeviceType)))
        {
            bool oldSupportsDevice = projectConfig.targetDeviceTypes.Contains(deviceType);
            bool newSupportsDevice = oldSupportsDevice;
            OVREditorUtil.SetupBoolField(projectConfig, ObjectNames.NicifyVariableName(deviceType.ToString()), ref newSupportsDevice, ref hasModified);

            if (newSupportsDevice && !oldSupportsDevice)
            {
                projectConfig.targetDeviceTypes.Add(deviceType);
            }
            else if (oldSupportsDevice && !newSupportsDevice)
            {
                projectConfig.targetDeviceTypes.Remove(deviceType);
            }
        }

        if (hasModified)
        {
            OVRProjectConfig.CommitProjectConfig(projectConfig);
        }
    }
    public static void DrawProjectConfigInspector(OVRProjectConfig projectConfig)
    {
        bool hasModified = false;

        EditorGUI.BeginDisabledGroup(!projectConfig.targetDeviceTypes.Contains(OVRProjectConfig.DeviceType.Quest));
        EditorGUILayout.LabelField("Quest Features", EditorStyles.boldLabel);

        // Show overlay support option
        OVREditorUtil.SetupBoolField(projectConfig, new GUIContent("Focus Aware",
                                                                   "If checked, the new overlay will be displayed when the user presses the home button. The game will not be paused, but will now receive InputFocusLost and InputFocusAcquired events."),
                                     ref projectConfig.focusAware, ref hasModified);

        // Color Gamut selection
        OVREditorUtil.SetupEnumField(projectConfig, new GUIContent(
                                         "Color Gamut",
                                         "The target color gamut when displayed on the Oculus Quest. Quest default is Rec. 2020"),
                                     ref projectConfig.colorGamut, ref hasModified);

        // Hand Tracking Support
        OVREditorUtil.SetupEnumField(projectConfig, "Hand Tracking Support", ref projectConfig.handTrackingSupport, ref hasModified);

        EditorGUI.EndDisabledGroup();
        EditorGUILayout.Space();

        EditorGUILayout.LabelField("Security", EditorStyles.boldLabel);
        OVREditorUtil.SetupBoolField(projectConfig, "Disable Backups", ref projectConfig.disableBackups, ref hasModified);
        OVREditorUtil.SetupBoolField(projectConfig, "Enable NSC Configuration", ref projectConfig.enableNSCConfig, ref hasModified);

        // apply any pending changes to project config
        if (hasModified)
        {
            OVRProjectConfig.CommitProjectConfig(projectConfig);
        }
    }
Beispiel #3
0
    public static void DrawProjectConfigInspector(OVRProjectConfig projectConfig)
    {
        bool hasModified = false;

        EditorGUI.BeginDisabledGroup(!projectConfig.targetDeviceTypes.Contains(OVRProjectConfig.DeviceType.Quest));
        EditorGUILayout.LabelField("Quest Features", EditorStyles.boldLabel);

        // Show overlay support option
        OVREditorUtil.SetupBoolField(projectConfig, new GUIContent("Focus Aware",
                                                                   "If checked, the new overlay will be displayed when the user presses the home button. The game will not be paused, but will now receive InputFocusLost and InputFocusAcquired events."),
                                     ref projectConfig.focusAware, ref hasModified);

        if (!projectConfig.focusAware && projectConfig.requiresSystemKeyboard)
        {
            projectConfig.requiresSystemKeyboard = false;
            hasModified = true;
        }

        // Hand Tracking Support
        OVREditorUtil.SetupEnumField(projectConfig, "Hand Tracking Support", ref projectConfig.handTrackingSupport, ref hasModified);


        // System Keyboard Support
        OVREditorUtil.SetupBoolField(projectConfig, new GUIContent("Requires System Keyboard",
                                                                   "*Requires Focus Awareness* If checked, the Oculus System keyboard will be enabled for Unity input fields and any calls to open/close the Unity TouchScreenKeyboard."),
                                     ref projectConfig.requiresSystemKeyboard, ref hasModified);

        if (projectConfig.requiresSystemKeyboard && !projectConfig.focusAware)
        {
            projectConfig.focusAware = true;
            hasModified = true;
        }

        EditorGUI.EndDisabledGroup();
        EditorGUILayout.Space();

        EditorGUI.BeginDisabledGroup(false);
        EditorGUILayout.LabelField("Android Build Settings", EditorStyles.boldLabel);

        // Show overlay support option
        OVREditorUtil.SetupBoolField(projectConfig, new GUIContent("Skip Unneeded Shaders",
                                                                   "If checked, prevent building shaders that are not used by default to reduce time spent when building."),
                                     ref projectConfig.skipUnneededShaders, ref hasModified);

        EditorGUI.EndDisabledGroup();
        EditorGUILayout.Space();

        EditorGUILayout.LabelField("Security", EditorStyles.boldLabel);
        OVREditorUtil.SetupInputField(projectConfig, "Custom Security XML Path", ref projectConfig.securityXmlPath, ref hasModified);
        OVREditorUtil.SetupBoolField(projectConfig, "Disable Backups", ref projectConfig.disableBackups, ref hasModified);
        OVREditorUtil.SetupBoolField(projectConfig, "Enable NSC Configuration", ref projectConfig.enableNSCConfig, ref hasModified);

        // apply any pending changes to project config
        if (hasModified)
        {
            OVRProjectConfig.CommitProjectConfig(projectConfig);
        }
    }
    public static void DrawProjectConfigInspector(OVRProjectConfig projectConfig)
    {
        bool hasModified = false;

        EditorGUI.BeginDisabledGroup(!projectConfig.targetDeviceTypes.Contains(OVRProjectConfig.DeviceType.Quest));
        EditorGUILayout.LabelField("Quest Features", EditorStyles.boldLabel);

        // Show overlay support option
        OVREditorUtil.SetupBoolField(projectConfig, new GUIContent("Focus Aware",
                                                                   "If checked, the new overlay will be displayed when the user presses the home button. The game will not be paused, but will now receive InputFocusLost and InputFocusAcquired events."),
                                     ref projectConfig.focusAware, ref hasModified);

        // Hand Tracking Support
        OVREditorUtil.SetupEnumField(projectConfig, "Hand Tracking Support", ref projectConfig.handTrackingSupport, ref hasModified);

        EditorGUI.EndDisabledGroup();
        EditorGUILayout.Space();

#if UNITY_2018_2_OR_NEWER
        EditorGUI.BeginDisabledGroup(false);
        EditorGUILayout.LabelField("Android Build Settings", EditorStyles.boldLabel);

        // Show overlay support option
        OVREditorUtil.SetupBoolField(projectConfig, new GUIContent("Skip Unneeded Shaders",
                                                                   "If checked, prevent building shaders that are not used by default to reduce time spent when building."),
                                     ref projectConfig.skipUnneededShaders, ref hasModified);

        EditorGUI.EndDisabledGroup();
        EditorGUILayout.Space();
#endif

        EditorGUILayout.LabelField("Security", EditorStyles.boldLabel);
        OVREditorUtil.SetupInputField(projectConfig, "Custom Security XML Path", ref projectConfig.securityXmlPath, ref hasModified);
        OVREditorUtil.SetupBoolField(projectConfig, "Disable Backups", ref projectConfig.disableBackups, ref hasModified);
        OVREditorUtil.SetupBoolField(projectConfig, "Enable NSC Configuration", ref projectConfig.enableNSCConfig, ref hasModified);

        // apply any pending changes to project config
        if (hasModified)
        {
            OVRProjectConfig.CommitProjectConfig(projectConfig);
        }
    }
Beispiel #5
0
    public static void DrawTargetDeviceInspector(OVRProjectConfig projectConfig)
    {
        // Target Devices
        EditorGUILayout.LabelField("Target Devices", EditorStyles.boldLabel);
#if PRIORITIZE_OCULUS_XR_SETTINGS
        EditorGUILayout.BeginHorizontal();
        EditorGUILayout.LabelField("Configure Target Devices in Oculus XR Plugin Settings.", GUILayout.Width(320));
        GUILayout.FlexibleSpace();
        if (GUILayout.Button("Open Settings"))
        {
            SettingsService.OpenProjectSettings("Project/XR Plug-in Management/Oculus");
        }
        EditorGUILayout.EndHorizontal();
#else
        bool hasModified = false;

        foreach (OVRProjectConfig.DeviceType deviceType in System.Enum.GetValues(typeof(OVRProjectConfig.DeviceType)))
        {
            bool oldSupportsDevice = projectConfig.targetDeviceTypes.Contains(deviceType);
            bool newSupportsDevice = oldSupportsDevice;
            OVREditorUtil.SetupBoolField(projectConfig, ObjectNames.NicifyVariableName(deviceType.ToString()), ref newSupportsDevice, ref hasModified);

            if (newSupportsDevice && !oldSupportsDevice)
            {
                projectConfig.targetDeviceTypes.Add(deviceType);
            }
            else if (oldSupportsDevice && !newSupportsDevice)
            {
                projectConfig.targetDeviceTypes.Remove(deviceType);
            }
        }

        if (hasModified)
        {
            OVRProjectConfig.CommitProjectConfig(projectConfig);
        }
#endif
    }
    public static void DrawProjectConfigInspector(OVRProjectConfig projectConfig)
    {
        bool hasModified = false;

        EditorGUILayout.LabelField("Quest Features", EditorStyles.boldLabel);

        // Show overlay support option
        OVREditorUtil.SetupBoolField(projectConfig, new GUIContent("Focus Aware",
                                                                   "If checked, the new overlay will be displayed when the user presses the home button. The game will not be paused, but will now receive InputFocusLost and InputFocusAcquired events."),
                                     ref projectConfig.focusAware, ref hasModified);

        if (!projectConfig.focusAware && projectConfig.requiresSystemKeyboard)
        {
            projectConfig.requiresSystemKeyboard = false;
            hasModified = true;
        }

        // Hand Tracking Support
        OVREditorUtil.SetupEnumField(projectConfig, "Hand Tracking Support", ref projectConfig.handTrackingSupport, ref hasModified);

        OVREditorUtil.SetupEnumField(projectConfig, new GUIContent("Hand Tracking Frequency",
                                                                   "Note that a higher tracking frequency will reserve some performance headroom from the application's budget."),
                                     ref projectConfig.handTrackingFrequency, ref hasModified, "https://developer.intern.oculus.com/documentation/unity/unity-handtracking/#enable-hand-tracking");


        // System Keyboard Support
        OVREditorUtil.SetupBoolField(projectConfig, new GUIContent("Requires System Keyboard",
                                                                   "*Requires Focus Awareness* If checked, the Oculus System keyboard will be enabled for Unity input fields and any calls to open/close the Unity TouchScreenKeyboard."),
                                     ref projectConfig.requiresSystemKeyboard, ref hasModified);

        // System Splash Screen
        OVREditorUtil.SetupTexture2DField(projectConfig, new GUIContent("System Splash Screen",
                                                                        "*System Splash Screen* If set, the Splash Screen will be presented by the Operating System as a high quality composition layer at launch time."),
                                          ref projectConfig.systemSplashScreen, ref hasModified);

        // Allow optional 3-dof head-tracking
        OVREditorUtil.SetupBoolField(projectConfig, new GUIContent("Allow Optional 3DoF Head Tracking",
                                                                   "If checked, application can work in both 6DoF and 3DoF modes. It's highly recommended to keep it unchecked unless your project strongly needs the 3DoF head tracking."),
                                     ref projectConfig.allowOptional3DofHeadTracking, ref hasModified);

        if (projectConfig.requiresSystemKeyboard && !projectConfig.focusAware)
        {
            projectConfig.focusAware = true;
            hasModified = true;
        }

        EditorGUI.EndDisabledGroup();
        EditorGUILayout.Space();

        EditorGUILayout.LabelField("Android Build Settings", EditorStyles.boldLabel);

        // Show overlay support option
        OVREditorUtil.SetupBoolField(projectConfig, new GUIContent("Skip Unneeded Shaders",
                                                                   "If checked, prevent building shaders that are not used by default to reduce time spent when building."),
                                     ref projectConfig.skipUnneededShaders, ref hasModified);

        EditorGUI.EndDisabledGroup();
        EditorGUILayout.Space();

        EditorGUILayout.LabelField("Security", EditorStyles.boldLabel);
        OVREditorUtil.SetupInputField(projectConfig, "Custom Security XML Path", ref projectConfig.securityXmlPath, ref hasModified);
        OVREditorUtil.SetupBoolField(projectConfig, "Disable Backups", ref projectConfig.disableBackups, ref hasModified);
        OVREditorUtil.SetupBoolField(projectConfig, "Enable NSC Configuration", ref projectConfig.enableNSCConfig, ref hasModified);

        // apply any pending changes to project config
        if (hasModified)
        {
            OVRProjectConfig.CommitProjectConfig(projectConfig);
        }
    }
Beispiel #7
0
    public static void DrawProjectConfigInspector(OVRProjectConfig projectConfig)
    {
        EditorGUILayout.BeginVertical(EditorStyles.helpBox);
        EditorGUILayout.LabelField("Quest Features", EditorStyles.boldLabel);

        if (projectConfigTabStrs == null)
        {
            projectConfigTabStrs = Enum.GetNames(typeof(eProjectConfigTab));
            for (int i = 0; i < projectConfigTabStrs.Length; ++i)
            {
                projectConfigTabStrs[i] = ObjectNames.NicifyVariableName(projectConfigTabStrs[i]);
            }
        }

        selectedTab = (eProjectConfigTab)GUILayout.SelectionGrid((int)selectedTab, projectConfigTabStrs, 3, GUI.skin.button);
        EditorGUILayout.Space(5);
        bool hasModified = false;

        switch (selectedTab)
        {
        case eProjectConfigTab.General:

            // Show overlay support option
            EditorGUI.BeginDisabledGroup(true);
            EditorGUILayout.Toggle(new GUIContent("Focus Aware (Required)",
                                                  "If checked, the new overlay will be displayed when the user presses the home button. The game will not be paused, but will now receive InputFocusLost and InputFocusAcquired events."), true);
            EditorGUI.EndDisabledGroup();

            // Hand Tracking Support
            OVREditorUtil.SetupEnumField(projectConfig, "Hand Tracking Support", ref projectConfig.handTrackingSupport, ref hasModified);

            OVREditorUtil.SetupEnumField(projectConfig, new GUIContent("Hand Tracking Frequency",
                                                                       "Note that a higher tracking frequency will reserve some performance headroom from the application's budget."),
                                         ref projectConfig.handTrackingFrequency, ref hasModified, "https://developer.oculus.com/documentation/unity/unity-handtracking/#enable-hand-tracking");


            // System Keyboard Support
            OVREditorUtil.SetupBoolField(projectConfig, new GUIContent("Requires System Keyboard",
                                                                       "If checked, the Oculus System keyboard will be enabled for Unity input fields and any calls to open/close the Unity TouchScreenKeyboard."),
                                         ref projectConfig.requiresSystemKeyboard, ref hasModified);

            // System Splash Screen
            OVREditorUtil.SetupTexture2DField(projectConfig, new GUIContent("System Splash Screen",
                                                                            "If set, the Splash Screen will be presented by the Operating System as a high quality composition layer at launch time."),
                                              ref projectConfig.systemSplashScreen, ref hasModified,
                                              "https://developer.oculus.com/documentation/unity/unity-splash-screen/");

            // Allow optional 3-dof head-tracking
            OVREditorUtil.SetupBoolField(projectConfig, new GUIContent("Allow Optional 3DoF Head Tracking",
                                                                       "If checked, application can work in both 6DoF and 3DoF modes. It's highly recommended to keep it unchecked unless your project strongly needs the 3DoF head tracking."),
                                         ref projectConfig.allowOptional3DofHeadTracking, ref hasModified);

            // Enable passthrough capability
            OVREditorUtil.SetupBoolField(projectConfig, new GUIContent("Passthrough Capability Enabled",
                                                                       "If checked, this application can use passthrough functionality. This option must be enabled at build time, otherwise initializing passthrough and creating passthrough layers in application scenes will fail."),
                                         ref projectConfig.insightPassthroughEnabled, ref hasModified);

            break;

        case eProjectConfigTab.BuildSettings:

            OVREditorUtil.SetupBoolField(projectConfig, new GUIContent("Skip Unneeded Shaders",
                                                                       "If checked, prevent building shaders that are not used by default to reduce time spent when building."),
                                         ref projectConfig.skipUnneededShaders, ref hasModified,
                                         "https://developer.oculus.com/documentation/unity/unity-strip-shaders/");

            break;

        case eProjectConfigTab.Security:

            OVREditorUtil.SetupBoolField(projectConfig, "Disable Backups", ref projectConfig.disableBackups, ref hasModified,
                                         "https://developer.android.com/guide/topics/data/autobackup#EnablingAutoBackup");
            OVREditorUtil.SetupBoolField(projectConfig, "Enable NSC Configuration", ref projectConfig.enableNSCConfig, ref hasModified,
                                         "https://developer.android.com/training/articles/security-config");
            EditorGUI.BeginDisabledGroup(!projectConfig.enableNSCConfig);
            ++EditorGUI.indentLevel;
            OVREditorUtil.SetupInputField(projectConfig, "Custom Security XML Path", ref projectConfig.securityXmlPath, ref hasModified);
            --EditorGUI.indentLevel;
            EditorGUI.EndDisabledGroup();

            break;

        case eProjectConfigTab.Experimental:

            // Experimental Features Enabled
            OVREditorUtil.SetupBoolField(projectConfig, new GUIContent("Experimental Features Enabled",
                                                                       "If checked, this application can use experimental features. Note that such features are for developer use only. This option must be disabled when submitting to the Oculus Store."),
                                         ref projectConfig.experimentalFeaturesEnabled, ref hasModified);

            // Spatial Anchors Support
            OVREditorUtil.SetupEnumField(projectConfig, "Spatial Anchors Support", ref projectConfig.spatialAnchorsSupport, ref hasModified);

            break;
        }
        EditorGUILayout.EndVertical();

        // apply any pending changes to project config
        if (hasModified)
        {
            OVRProjectConfig.CommitProjectConfig(projectConfig);
        }
    }
    override public void OnInspectorGUI()
    {
#if UNITY_ANDROID
        OVRProjectConfig projectConfig = OVRProjectConfig.GetProjectConfig();
        OVRProjectConfigEditor.DrawTargetDeviceInspector(projectConfig);

        EditorGUILayout.Space();
#endif

        DrawDefaultInspector();

#if UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN || UNITY_ANDROID
        OVRManager manager = (OVRManager)target;
#endif

        bool modified = false;
#if UNITY_ANDROID
        EditorGUILayout.Space();
        OVRProjectConfigEditor.DrawProjectConfigInspector(projectConfig);

        EditorGUILayout.Space();
        EditorGUILayout.LabelField("Mixed Reality Capture for Quest (experimental)", EditorStyles.boldLabel);
        EditorGUI.indentLevel++;
        OVREditorUtil.SetupEnumField(target, "ActivationMode", ref manager.mrcActivationMode, ref modified);
        EditorGUI.indentLevel--;
#endif

#if UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN
        EditorGUILayout.Space();
        EditorGUILayout.LabelField("Mixed Reality Capture", EditorStyles.boldLabel);
        OVREditorUtil.SetupBoolField(target, "Show Properties", ref manager.expandMixedRealityCapturePropertySheet, ref modified);
        if (manager.expandMixedRealityCapturePropertySheet)
        {
            string[] layerMaskOptions = new string[32];
            for (int i = 0; i < 32; ++i)
            {
                layerMaskOptions[i] = LayerMask.LayerToName(i);
                if (layerMaskOptions[i].Length == 0)
                {
                    layerMaskOptions[i] = "<Layer " + i.ToString() + ">";
                }
            }

            EditorGUI.indentLevel++;

            EditorGUILayout.Space();
            OVREditorUtil.SetupBoolField(target, "enableMixedReality", ref manager.enableMixedReality, ref modified);
            OVREditorUtil.SetupEnumField(target, "compositionMethod", ref manager.compositionMethod, ref modified);
            OVREditorUtil.SetupLayerMaskField(target, "extraHiddenLayers", ref manager.extraHiddenLayers, layerMaskOptions, ref modified);

            if (manager.compositionMethod == OVRManager.CompositionMethod.External)
            {
                EditorGUILayout.Space();
                EditorGUILayout.LabelField("External Composition", EditorStyles.boldLabel);
                EditorGUI.indentLevel++;

                OVREditorUtil.SetupColorField(target, "backdropColor (target, Rift)", ref manager.externalCompositionBackdropColorRift, ref modified);
                OVREditorUtil.SetupColorField(target, "backdropColor (target, Quest)", ref manager.externalCompositionBackdropColorQuest, ref modified);
            }

            if (manager.compositionMethod == OVRManager.CompositionMethod.Direct)
            {
                EditorGUILayout.Space();
                EditorGUILayout.LabelField("Direct Composition", EditorStyles.boldLabel);
                EditorGUI.indentLevel++;

                EditorGUILayout.Space();
                EditorGUILayout.LabelField("Camera", EditorStyles.boldLabel);
                OVREditorUtil.SetupEnumField(target, "capturingCameraDevice", ref manager.capturingCameraDevice, ref modified);
                OVREditorUtil.SetupBoolField(target, "flipCameraFrameHorizontally", ref manager.flipCameraFrameHorizontally, ref modified);
                OVREditorUtil.SetupBoolField(target, "flipCameraFrameVertically", ref manager.flipCameraFrameVertically, ref modified);

                EditorGUILayout.Space();
                EditorGUILayout.LabelField("Chroma Key", EditorStyles.boldLabel);
                OVREditorUtil.SetupColorField(target, "chromaKeyColor", ref manager.chromaKeyColor, ref modified);
                OVREditorUtil.SetupFloatField(target, "chromaKeySimilarity", ref manager.chromaKeySimilarity, ref modified);
                OVREditorUtil.SetupFloatField(target, "chromaKeySmoothRange", ref manager.chromaKeySmoothRange, ref modified);
                OVREditorUtil.SetupFloatField(target, "chromaKeySpillRange", ref manager.chromaKeySpillRange, ref modified);

                EditorGUILayout.Space();
                EditorGUILayout.LabelField("Dynamic Lighting", EditorStyles.boldLabel);
                OVREditorUtil.SetupBoolField(target, "useDynamicLighting", ref manager.useDynamicLighting, ref modified);
                OVREditorUtil.SetupEnumField(target, "depthQuality", ref manager.depthQuality, ref modified);
                OVREditorUtil.SetupFloatField(target, "dynamicLightingSmoothFactor", ref manager.dynamicLightingSmoothFactor, ref modified);
                OVREditorUtil.SetupFloatField(target, "dynamicLightingDepthVariationClampingValue", ref manager.dynamicLightingDepthVariationClampingValue, ref modified);

                EditorGUILayout.Space();
                EditorGUILayout.LabelField("Virtual Green Screen", EditorStyles.boldLabel);
                OVREditorUtil.SetupEnumField(target, "virtualGreenScreenType", ref manager.virtualGreenScreenType, ref modified);
                OVREditorUtil.SetupFloatField(target, "virtualGreenScreenTopY", ref manager.virtualGreenScreenTopY, ref modified);
                OVREditorUtil.SetupFloatField(target, "virtualGreenScreenBottomY", ref manager.virtualGreenScreenBottomY, ref modified);
                OVREditorUtil.SetupBoolField(target, "virtualGreenScreenApplyDepthCulling", ref manager.virtualGreenScreenApplyDepthCulling, ref modified);
                OVREditorUtil.SetupFloatField(target, "virtualGreenScreenDepthTolerance", ref manager.virtualGreenScreenDepthTolerance, ref modified);

                EditorGUILayout.Space();
                EditorGUILayout.LabelField("Latency Control", EditorStyles.boldLabel);
                OVREditorUtil.SetupFloatField(target, "handPoseStateLatency", ref manager.handPoseStateLatency, ref modified);
                EditorGUI.indentLevel--;
            }

            EditorGUI.indentLevel--;
        }
#endif
        if (modified)
        {
            EditorUtility.SetDirty(target);
        }
    }
Beispiel #9
0
    override public void OnInspectorGUI()
    {
        OVRRuntimeSettings runtimeSettings = OVRRuntimeSettings.GetRuntimeSettings();

#if UNITY_ANDROID
        OVRProjectConfig projectConfig = OVRProjectConfig.GetProjectConfig();
        OVRProjectConfigEditor.DrawTargetDeviceInspector(projectConfig);

        EditorGUILayout.Space();
#endif

        DrawDefaultInspector();

        bool modified = false;

#if UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN || UNITY_ANDROID
        OVRManager manager = (OVRManager)target;

        EditorGUILayout.Space();
        EditorGUILayout.LabelField("Display", EditorStyles.boldLabel);

        OVRManager.ColorSpace colorGamut = runtimeSettings.colorSpace;
        OVREditorUtil.SetupEnumField(target, new GUIContent("Color Gamut",
                                                            "The target color gamut when displayed on the HMD"), ref colorGamut, ref modified,
                                     "https://developer.oculus.com/documentation/unity/unity-color-space/");
        manager.colorGamut = colorGamut;

        if (modified)
        {
            runtimeSettings.colorSpace = colorGamut;
            OVRRuntimeSettings.CommitRuntimeSettings(runtimeSettings);
        }
#endif

#if UNITY_ANDROID
        EditorGUILayout.Space();
        OVRProjectConfigEditor.DrawProjectConfigInspector(projectConfig);

        EditorGUILayout.Space();
        EditorGUILayout.LabelField("Mixed Reality Capture for Quest", EditorStyles.boldLabel);
        EditorGUI.indentLevel++;
        OVREditorUtil.SetupEnumField(target, "ActivationMode", ref manager.mrcActivationMode, ref modified);
        EditorGUI.indentLevel--;
#endif

#if UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN
        EditorGUILayout.Space();
        EditorGUILayout.BeginHorizontal();
        manager.expandMixedRealityCapturePropertySheet = EditorGUILayout.BeginFoldoutHeaderGroup(manager.expandMixedRealityCapturePropertySheet, "Mixed Reality Capture");
        OVREditorUtil.DisplayDocLink("https://developer.oculus.com/documentation/unity/unity-mrc/");
        EditorGUILayout.EndHorizontal();
        if (manager.expandMixedRealityCapturePropertySheet)
        {
            string[] layerMaskOptions = new string[32];
            for (int i = 0; i < 32; ++i)
            {
                layerMaskOptions[i] = LayerMask.LayerToName(i);
                if (layerMaskOptions[i].Length == 0)
                {
                    layerMaskOptions[i] = "<Layer " + i.ToString() + ">";
                }
            }

            EditorGUI.indentLevel++;

            OVREditorUtil.SetupBoolField(target, "enableMixedReality", ref manager.enableMixedReality, ref modified);
            OVREditorUtil.SetupEnumField(target, "compositionMethod", ref manager.compositionMethod, ref modified);
            OVREditorUtil.SetupLayerMaskField(target, "extraHiddenLayers", ref manager.extraHiddenLayers, layerMaskOptions, ref modified);
            OVREditorUtil.SetupLayerMaskField(target, "extraVisibleLayers", ref manager.extraVisibleLayers, layerMaskOptions, ref modified);
            OVREditorUtil.SetupBoolField(target, "dynamicCullingMask", ref manager.dynamicCullingMask, ref modified);

            if (manager.compositionMethod == OVRManager.CompositionMethod.External)
            {
                EditorGUILayout.Space();
                EditorGUILayout.LabelField("External Composition", EditorStyles.boldLabel);
                EditorGUI.indentLevel++;

                OVREditorUtil.SetupColorField(target, "backdropColor (target, Rift)", ref manager.externalCompositionBackdropColorRift, ref modified);
                OVREditorUtil.SetupColorField(target, "backdropColor (target, Quest)", ref manager.externalCompositionBackdropColorQuest, ref modified);
                EditorGUI.indentLevel--;
            }

            if (manager.compositionMethod == OVRManager.CompositionMethod.Direct)
            {
                EditorGUILayout.Space();
                EditorGUILayout.LabelField("Direct Composition", EditorStyles.boldLabel);
                EditorGUI.indentLevel++;

                EditorGUILayout.Space();
                EditorGUILayout.LabelField("Camera", EditorStyles.boldLabel);
                OVREditorUtil.SetupEnumField(target, "capturingCameraDevice", ref manager.capturingCameraDevice, ref modified);
                OVREditorUtil.SetupBoolField(target, "flipCameraFrameHorizontally", ref manager.flipCameraFrameHorizontally, ref modified);
                OVREditorUtil.SetupBoolField(target, "flipCameraFrameVertically", ref manager.flipCameraFrameVertically, ref modified);

                EditorGUILayout.Space();
                EditorGUILayout.LabelField("Chroma Key", EditorStyles.boldLabel);
                OVREditorUtil.SetupColorField(target, "chromaKeyColor", ref manager.chromaKeyColor, ref modified);
                OVREditorUtil.SetupFloatField(target, "chromaKeySimilarity", ref manager.chromaKeySimilarity, ref modified);
                OVREditorUtil.SetupFloatField(target, "chromaKeySmoothRange", ref manager.chromaKeySmoothRange, ref modified);
                OVREditorUtil.SetupFloatField(target, "chromaKeySpillRange", ref manager.chromaKeySpillRange, ref modified);

                EditorGUILayout.Space();
                EditorGUILayout.LabelField("Dynamic Lighting", EditorStyles.boldLabel);
                OVREditorUtil.SetupBoolField(target, "useDynamicLighting", ref manager.useDynamicLighting, ref modified);
                OVREditorUtil.SetupEnumField(target, "depthQuality", ref manager.depthQuality, ref modified);
                OVREditorUtil.SetupFloatField(target, "dynamicLightingSmoothFactor", ref manager.dynamicLightingSmoothFactor, ref modified);
                OVREditorUtil.SetupFloatField(target, "dynamicLightingDepthVariationClampingValue", ref manager.dynamicLightingDepthVariationClampingValue, ref modified);

                EditorGUILayout.Space();
                EditorGUILayout.LabelField("Virtual Green Screen", EditorStyles.boldLabel);
                OVREditorUtil.SetupEnumField(target, "virtualGreenScreenType", ref manager.virtualGreenScreenType, ref modified);
                OVREditorUtil.SetupFloatField(target, "virtualGreenScreenTopY", ref manager.virtualGreenScreenTopY, ref modified);
                OVREditorUtil.SetupFloatField(target, "virtualGreenScreenBottomY", ref manager.virtualGreenScreenBottomY, ref modified);
                OVREditorUtil.SetupBoolField(target, "virtualGreenScreenApplyDepthCulling", ref manager.virtualGreenScreenApplyDepthCulling, ref modified);
                OVREditorUtil.SetupFloatField(target, "virtualGreenScreenDepthTolerance", ref manager.virtualGreenScreenDepthTolerance, ref modified);

                EditorGUILayout.Space();
                EditorGUILayout.LabelField("Latency Control", EditorStyles.boldLabel);
                OVREditorUtil.SetupFloatField(target, "handPoseStateLatency", ref manager.handPoseStateLatency, ref modified);
                EditorGUI.indentLevel--;
            }

            EditorGUI.indentLevel--;
        }
#endif

#if UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN || UNITY_ANDROID
        // Insight Passthrough section
#if UNITY_ANDROID
        bool passthroughCapabilityEnabled = projectConfig.insightPassthroughEnabled;
        EditorGUI.BeginDisabledGroup(!passthroughCapabilityEnabled);
        GUIContent enablePassthroughContent = new GUIContent("Enable Passthrough", "Enables passthrough functionality for the scene. Can be toggled at runtime. Passthrough Capability must be enabled in the project settings.");
#else
        GUIContent enablePassthroughContent = new GUIContent("Enable Passthrough", "Enables passthrough functionality for the scene. Can be toggled at runtime.");
#endif
        EditorGUILayout.Space();
        EditorGUILayout.LabelField("Insight Passthrough", EditorStyles.boldLabel);
#if UNITY_ANDROID
        if (!passthroughCapabilityEnabled)
        {
            EditorGUILayout.LabelField("Requires Passthrough Capability to be enabled in the General section of the Quest features.", EditorStyles.wordWrappedLabel);
        }
#endif
        OVREditorUtil.SetupBoolField(target, enablePassthroughContent, ref manager.isInsightPassthroughEnabled, ref modified);
#if UNITY_ANDROID
        EditorGUI.EndDisabledGroup();
#endif
#endif

        if (modified)
        {
            EditorUtility.SetDirty(target);
        }
    }