EndFadeGroup() public static method

Closes a group started with BeginFadeGroup.

public static EndFadeGroup ( ) : void
return void
        public override void OnInspectorGUI()
        {
            base.serializedObject.Update();
            this.m_lightmapSettings.Update();
            EditorGUILayout.Space();
            this.m_ShowEditor = EditorGUILayout.FoldoutTitlebar(this.m_ShowEditor, Styles.environmentHeader);
            if (this.m_ShowEditor)
            {
                EditorGUI.indentLevel++;
                EditorGUILayout.PropertyField(this.m_SkyboxMaterial, Styles.skyboxLabel, new GUILayoutOption[0]);
                Material objectReferenceValue = this.m_SkyboxMaterial.objectReferenceValue as Material;
                if ((objectReferenceValue != null) && !EditorMaterialUtility.IsBackgroundMaterial(objectReferenceValue))
                {
                    EditorGUILayout.HelpBox(Styles.skyboxWarning.text, MessageType.Warning);
                }
                EditorGUILayout.PropertyField(this.m_Sun, Styles.sunLabel, new GUILayoutOption[0]);
                EditorGUILayout.Space();
                EditorGUILayout.IntPopup(this.m_AmbientMode, Styles.kFullAmbientModes, Styles.kFullAmbientModeValues, Styles.ambientModeLabel, new GUILayoutOption[0]);
                EditorGUI.indentLevel++;
                switch (((AmbientMode)this.m_AmbientMode.intValue))
                {
                case AmbientMode.Trilight:
                {
                    EditorGUI.BeginChangeCheck();
                    Color color  = EditorGUILayout.ColorField(Styles.ambientUp, this.m_AmbientSkyColor.colorValue, true, false, true, ColorPicker.defaultHDRConfig, new GUILayoutOption[0]);
                    Color color2 = EditorGUILayout.ColorField(Styles.ambientMid, this.m_AmbientEquatorColor.colorValue, true, false, true, ColorPicker.defaultHDRConfig, new GUILayoutOption[0]);
                    Color color3 = EditorGUILayout.ColorField(Styles.ambientDown, this.m_AmbientGroundColor.colorValue, true, false, true, ColorPicker.defaultHDRConfig, new GUILayoutOption[0]);
                    if (EditorGUI.EndChangeCheck())
                    {
                        this.m_AmbientSkyColor.colorValue     = color;
                        this.m_AmbientEquatorColor.colorValue = color2;
                        this.m_AmbientGroundColor.colorValue  = color3;
                    }
                    break;
                }

                case AmbientMode.Flat:
                {
                    EditorGUI.BeginChangeCheck();
                    Color color4 = EditorGUILayout.ColorField(Styles.ambient, this.m_AmbientSkyColor.colorValue, true, false, true, ColorPicker.defaultHDRConfig, new GUILayoutOption[0]);
                    if (EditorGUI.EndChangeCheck())
                    {
                        this.m_AmbientSkyColor.colorValue = color4;
                    }
                    break;
                }

                case AmbientMode.Skybox:
                    if (objectReferenceValue == null)
                    {
                        EditorGUI.BeginChangeCheck();
                        Color color5 = EditorGUILayout.ColorField(Styles.ambient, this.m_AmbientSkyColor.colorValue, true, false, true, ColorPicker.defaultHDRConfig, new GUILayoutOption[0]);
                        if (EditorGUI.EndChangeCheck())
                        {
                            this.m_AmbientSkyColor.colorValue = color5;
                        }
                    }
                    else
                    {
                        EditorGUILayout.Slider(this.m_AmbientIntensity, 0f, 8f, Styles.ambientIntensity, new GUILayoutOption[0]);
                    }
                    break;
                }
                EditorGUI.indentLevel--;
                this.m_ShowAmbientBakeMode.target = ShowAmbientField();
                if (EditorGUILayout.BeginFadeGroup(this.m_ShowAmbientBakeMode.faded))
                {
                    bool flag = Lightmapping.realtimeGI && Lightmapping.bakedGI;
                    using (new EditorGUI.DisabledScope(!flag))
                    {
                        if (flag)
                        {
                            EditorGUILayout.PropertyField(this.m_EnvironmentLightingMode, Styles.SkyLightBaked, new GUILayoutOption[0]);
                        }
                        else
                        {
                            int index = !Lightmapping.bakedGI ? 0 : 1;
                            EditorGUILayout.LabelField(Styles.SkyLightBaked, GUIContent.Temp(this.m_EnvironmentLightingMode.enumNames[index]), EditorStyles.popup, new GUILayoutOption[0]);
                        }
                    }
                }
                EditorGUILayout.EndFadeGroup();
                EditorGUILayout.Space();
                EditorGUILayout.PropertyField(this.m_DefaultReflectionMode, Styles.reflectionModeLabel, new GUILayoutOption[0]);
                EditorGUI.indentLevel++;
                Cubemap cubemap = this.m_CustomReflection.objectReferenceValue as Cubemap;
                UnityEditor.DefaultReflectionMode intValue = (UnityEditor.DefaultReflectionMode) this.m_DefaultReflectionMode.intValue;
                if (((objectReferenceValue == null) && (intValue == UnityEditor.DefaultReflectionMode.FromSkybox)) || ((cubemap == null) && (intValue == UnityEditor.DefaultReflectionMode.Custom)))
                {
                    EditorGUILayout.HelpBox(Styles.defReflectionWarning.text, MessageType.Warning);
                }
                if (intValue == UnityEditor.DefaultReflectionMode.FromSkybox)
                {
                    GUILayoutOption[] options = new GUILayoutOption[] { GUILayout.MinWidth(40f) };
                    EditorGUILayout.IntPopup(this.m_DefaultReflectionResolution, Styles.defaultReflectionSizes, Styles.defaultReflectionSizesValues, Styles.defaultReflectionResolution, options);
                }
                else if (intValue == UnityEditor.DefaultReflectionMode.Custom)
                {
                    EditorGUILayout.PropertyField(this.m_CustomReflection, Styles.customReflection, new GUILayoutOption[0]);
                }
                EditorGUILayout.PropertyField(this.m_ReflectionCompression, Styles.ReflectionCompression, new GUILayoutOption[0]);
                EditorGUI.indentLevel--;
                EditorGUILayout.Slider(this.m_ReflectionIntensity, 0f, 1f, Styles.reflectionIntensity, new GUILayoutOption[0]);
                EditorGUILayout.IntSlider(this.m_ReflectionBounces, 1, 5, Styles.reflectionBounces, new GUILayoutOption[0]);
                EditorGUI.indentLevel--;
                base.serializedObject.ApplyModifiedProperties();
                this.m_lightmapSettings.ApplyModifiedProperties();
            }
        }
示例#2
0
        private void HandleTargetField(VideoRenderMode currentRenderMode)
        {
            m_ShowRenderTexture.target = currentRenderMode == VideoRenderMode.RenderTexture;
            if (EditorGUILayout.BeginFadeGroup(m_ShowRenderTexture.faded))
            {
                EditorGUILayout.PropertyField(m_TargetTexture, s_Styles.textureContent);
            }
            EditorGUILayout.EndFadeGroup();

            m_ShowTargetCamera.target = (currentRenderMode == VideoRenderMode.CameraFarPlane) ||
                                        (currentRenderMode == VideoRenderMode.CameraNearPlane);
            if (EditorGUILayout.BeginFadeGroup(m_ShowTargetCamera.faded))
            {
                EditorGUILayout.PropertyField(m_TargetCamera, s_Styles.cameraContent);
                EditorGUILayout.Slider(m_TargetCameraAlpha, 0.0f, 1.0f, s_Styles.alphaContent);
                // If VR is enabled in PlayerSettings on ANY platform, show the 3D layout option
                foreach (BuildPlatform cur in BuildPlatforms.instance.buildPlatforms)
                {
                    if (UnityEditorInternal.VR.VREditor.GetVREnabledOnTargetGroup(cur.targetGroup))
                    {
                        EditorGUILayout.PropertyField(m_TargetCamera3DLayout, s_Styles.camera3DLayout);
                        break;
                    }
                }
            }
            EditorGUILayout.EndFadeGroup();

            m_ShowRenderer.target = currentRenderMode == VideoRenderMode.MaterialOverride;
            if (EditorGUILayout.BeginFadeGroup(m_ShowRenderer.faded))
            {
                bool hasMultipleSelection = targets.Length > 1;
                if (hasMultipleSelection)
                {
                    EditorGUILayout.PropertyField(m_TargetMaterialRenderer, s_Styles.materialRendererContent);
                }
                else
                {
                    Rect       rect  = EditorGUILayout.GetControlRect(true, EditorGUI.kSingleLineHeight);
                    GUIContent label = EditorGUI.BeginProperty(
                        rect, s_Styles.materialRendererContent, m_TargetMaterialRenderer);
                    EditorGUI.BeginChangeCheck();
                    var newRenderer = EditorGUI.ObjectField(
                        rect, label, GetTargetRenderer((VideoPlayer)target), typeof(Renderer), true);
                    if (EditorGUI.EndChangeCheck())
                    {
                        m_TargetMaterialRenderer.objectReferenceValue = newRenderer;
                    }
                    EditorGUI.EndProperty();
                }

                int curHash = GetMaterialPropertyPopupHash(targets);
                if (m_MaterialPropertyPopupContentHash != curHash)
                {
                    m_MaterialPropertyPopupContent = BuildPopupEntries(
                        targets, GetMaterialPropertyNames, out m_MaterialPropertyPopupSelection,
                        out m_MaterialPropertyPopupInvalidSelections);
                }
                HandlePopup(s_Styles.materialPropertyContent, m_TargetMaterialProperty, m_MaterialPropertyPopupContent, m_MaterialPropertyPopupSelection);
                if (m_MaterialPropertyPopupInvalidSelections > 0 || m_MaterialPropertyPopupContent.Length == 0)
                {
                    GUILayout.BeginHorizontal();
                    GUILayout.Space(EditorGUIUtility.labelWidth);
                    if (m_MaterialPropertyPopupContent.Length == 0)
                    {
                        if (!hasMultipleSelection)
                        {
                            EditorGUILayout.HelpBox(s_Styles.rendererMaterialsHaveNoTexPropsHelp, MessageType.Warning);
                        }
                        else
                        {
                            EditorGUILayout.HelpBox(s_Styles.someRendererMaterialsHaveNoTexPropsHelp, MessageType.Warning);
                        }
                    }
                    else if (!hasMultipleSelection)
                    {
                        EditorGUILayout.HelpBox(s_Styles.invalidTexPropSelectionHelp, MessageType.Warning);
                    }
                    else if (m_MaterialPropertyPopupInvalidSelections == 1)
                    {
                        EditorGUILayout.HelpBox(s_Styles.oneInvalidTexPropSelectionHelp, MessageType.Warning);
                    }
                    else
                    {
                        EditorGUILayout.HelpBox(
                            string.Format(s_Styles.someInvalidTexPropSelectionsHelp, m_MaterialPropertyPopupInvalidSelections),
                            MessageType.Warning);
                    }
                    GUILayout.EndHorizontal();
                }
                else
                {
                    DisplayMultiMaterialInformation(m_MaterialPropertyPopupContentHash != curHash);
                }

                m_MaterialPropertyPopupContentHash = curHash;
            }
            EditorGUILayout.EndFadeGroup();

            m_ShowAspectRatio.target =
                currentRenderMode != VideoRenderMode.MaterialOverride &&
                currentRenderMode != VideoRenderMode.APIOnly;
            if (EditorGUILayout.BeginFadeGroup(m_ShowAspectRatio.faded))
            {
                EditorGUILayout.PropertyField(m_AspectRatio, s_Styles.aspectRatioLabel);
            }
            EditorGUILayout.EndFadeGroup();
        }
        public override void OnInspectorGUI()
        {
            serializedObject.Update();

            EditorGUILayout.PropertyField(m_Sprite, Contents.spriteLabel);

            EditorGUILayout.PropertyField(m_Color, Contents.colorLabel, true);

            FlipToggles();

            Rect r = GUILayoutUtility.GetRect(
                EditorGUILayout.kLabelFloatMinW, EditorGUILayout.kLabelFloatMaxW,
                EditorGUI.kSingleLineHeight, EditorGUI.kSingleLineHeight);

            EditorGUI.showMixedValue = m_Material.hasMultipleDifferentValues;
            Object currentMaterialRef  = m_Material.GetArrayElementAtIndex(0).objectReferenceValue;
            Object returnedMaterialRef = EditorGUI.ObjectField(r, Contents.materialLabel, currentMaterialRef, typeof(Material), false);

            if (returnedMaterialRef != currentMaterialRef)
            {
                m_Material.GetArrayElementAtIndex(0).objectReferenceValue = returnedMaterialRef;
            }
            EditorGUI.showMixedValue = false;

            EditorGUILayout.PropertyField(m_DrawMode, Contents.drawModeLabel);

            m_ShowDrawMode.target = ShouldShowDrawMode();
            if (EditorGUILayout.BeginFadeGroup(m_ShowDrawMode.faded))
            {
                string notFullRectWarning = GetSpriteNotFullRectWarning();
                if (notFullRectWarning != null)
                {
                    EditorGUILayout.HelpBox(notFullRectWarning, MessageType.Warning);
                }

                EditorGUI.indentLevel++;
                EditorGUILayout.BeginHorizontal();
                EditorGUILayout.PrefixLabel(Contents.sizeLabel);
                EditorGUI.showMixedValue = m_Size.hasMultipleDifferentValues;
                FloatFieldLabelAbove(Contents.widthLabel, m_Size.FindPropertyRelative("x"));
                FloatFieldLabelAbove(Contents.heightLabel, m_Size.FindPropertyRelative("y"));
                EditorGUI.showMixedValue = false;
                EditorGUILayout.EndHorizontal();

                m_ShowTileMode.target = ShouldShowTileMode();
                if (EditorGUILayout.BeginFadeGroup(m_ShowTileMode.faded))
                {
                    EditorGUILayout.PropertyField(m_SpriteTileMode, Contents.fullTileLabel);

                    m_ShowAdaptiveThreshold.target = ShouldShowAdaptiveThreshold();
                    if (EditorGUILayout.BeginFadeGroup(m_ShowAdaptiveThreshold.faded))
                    {
                        EditorGUI.indentLevel++;
                        EditorGUILayout.Slider(m_AdaptiveModeThreshold, 0.0f, 1.0f, Contents.fullTileThresholdLabel);
                        EditorGUI.indentLevel--;
                    }
                    EditorGUILayout.EndFadeGroup();
                }
                EditorGUILayout.EndFadeGroup();
                EditorGUI.indentLevel--;
            }
            EditorGUILayout.EndFadeGroup();

            RenderSortingLayerFields();

            EditorGUILayout.PropertyField(m_MaskInteraction, Contents.maskInteractionLabel);

            EditorGUILayout.PropertyField(m_SpriteSortPoint, Contents.spriteSortPointLabel);

            RenderRenderingLayer();

            CheckForErrors();

            serializedObject.ApplyModifiedProperties();
        }
示例#4
0
        private void DrawInfoView()
        {
            m_ShowInfoFoldout.value = m_ShowInfo.target = EditorGUILayout.Foldout(m_ShowInfo.target, "Info", true);
            if (EditorGUILayout.BeginFadeGroup(m_ShowInfo.faded))
            {
                if (targets.Length == 1)
                {
                    EditorGUI.BeginDisabledGroup(true);
                    var tileCount   = tilemap.GetUsedTilesCount();
                    var spriteCount = tilemap.GetUsedSpritesCount();
                    if (usedTiles == null || usedTiles.Length != tileCount)
                    {
                        usedTiles = new TileBase[tileCount];
                    }
                    if (usedSprites == null || usedSprites.Length != spriteCount)
                    {
                        usedSprites = new Sprite[spriteCount];
                    }
                    tilemap.GetUsedTilesNonAlloc(usedTiles);
                    tilemap.GetUsedSpritesNonAlloc(usedSprites);

                    EditorGUILayout.BeginHorizontal();
                    EditorGUILayout.LabelField(Styles.usedTilesLabel, EditorStyles.boldLabel);
                    GUILayout.FlexibleSpace();
                    EditorGUILayout.EndHorizontal();
                    if (tileCount > 0)
                    {
                        foreach (var tile in usedTiles)
                        {
                            EditorGUILayout.ObjectField(tile, typeof(TileBase), false);
                        }
                    }
                    else
                    {
                        EditorGUILayout.LabelField(Styles.noneUsedLabel);
                    }

                    EditorGUILayout.BeginHorizontal();
                    EditorGUILayout.LabelField(Styles.usedSpritesLabel, EditorStyles.boldLabel);
                    GUILayout.FlexibleSpace();
                    EditorGUILayout.EndHorizontal();
                    if (spriteCount > 0)
                    {
                        foreach (var sprite in usedSprites)
                        {
                            EditorGUILayout.ObjectField(sprite, typeof(Sprite), false);
                        }
                    }
                    else
                    {
                        EditorGUILayout.LabelField(Styles.noneUsedLabel);
                    }
                    EditorGUI.EndDisabledGroup();
                }
                else
                {
                    EditorGUILayout.HelpBox("Cannot show Info properties when multiple Tilemaps are selected.", MessageType.Info);
                }
            }
            EditorGUILayout.EndFadeGroup();
        }
 private void HandleTargetField(VideoRenderMode currentRenderMode)
 {
     this.m_ShowRenderTexture.target = (currentRenderMode == VideoRenderMode.RenderTexture);
     if (EditorGUILayout.BeginFadeGroup(this.m_ShowRenderTexture.faded))
     {
         EditorGUILayout.PropertyField(this.m_TargetTexture, VideoPlayerEditor.s_Styles.textureContent, new GUILayoutOption[0]);
     }
     EditorGUILayout.EndFadeGroup();
     this.m_ShowTargetCamera.target = (currentRenderMode == VideoRenderMode.CameraFarPlane || currentRenderMode == VideoRenderMode.CameraNearPlane);
     if (EditorGUILayout.BeginFadeGroup(this.m_ShowTargetCamera.faded))
     {
         EditorGUILayout.PropertyField(this.m_TargetCamera, VideoPlayerEditor.s_Styles.cameraContent, new GUILayoutOption[0]);
         EditorGUILayout.Slider(this.m_TargetCameraAlpha, 0f, 1f, VideoPlayerEditor.s_Styles.alphaContent, new GUILayoutOption[0]);
         BuildPlatform[] buildPlatforms = BuildPlatforms.instance.buildPlatforms;
         for (int i = 0; i < buildPlatforms.Length; i++)
         {
             BuildPlatform buildPlatform = buildPlatforms[i];
             if (VREditor.GetVREnabledOnTargetGroup(buildPlatform.targetGroup))
             {
                 EditorGUILayout.PropertyField(this.m_TargetCamera3DLayout, VideoPlayerEditor.s_Styles.camera3DLayout, new GUILayoutOption[0]);
                 break;
             }
         }
     }
     EditorGUILayout.EndFadeGroup();
     this.m_ShowRenderer.target = (currentRenderMode == VideoRenderMode.MaterialOverride);
     if (EditorGUILayout.BeginFadeGroup(this.m_ShowRenderer.faded))
     {
         bool flag = base.targets.Count <UnityEngine.Object>() > 1;
         if (flag)
         {
             EditorGUILayout.PropertyField(this.m_TargetMaterialRenderer, VideoPlayerEditor.s_Styles.materialRendererContent, new GUILayoutOption[0]);
         }
         else
         {
             Rect       controlRect = EditorGUILayout.GetControlRect(true, 16f, new GUILayoutOption[0]);
             GUIContent label       = EditorGUI.BeginProperty(controlRect, VideoPlayerEditor.s_Styles.materialRendererContent, this.m_TargetMaterialRenderer);
             EditorGUI.BeginChangeCheck();
             UnityEngine.Object objectReferenceValue = EditorGUI.ObjectField(controlRect, label, VideoPlayerEditor.GetTargetRenderer((VideoPlayer)base.target), typeof(Renderer), true);
             if (EditorGUI.EndChangeCheck())
             {
                 this.m_TargetMaterialRenderer.objectReferenceValue = objectReferenceValue;
             }
             EditorGUI.EndProperty();
         }
         int materialPropertyPopupHash = VideoPlayerEditor.GetMaterialPropertyPopupHash(base.targets);
         if (this.m_MaterialPropertyPopupContentHash != materialPropertyPopupHash)
         {
             UnityEngine.Object[] arg_22D_0 = base.targets;
             if (VideoPlayerEditor.< > f__mg$cache1 == null)
             {
                 VideoPlayerEditor.< > f__mg$cache1 = new VideoPlayerEditor.EntryGenerator(VideoPlayerEditor.GetMaterialPropertyNames);
             }
             this.m_MaterialPropertyPopupContent = VideoPlayerEditor.BuildPopupEntries(arg_22D_0, VideoPlayerEditor.< > f__mg$cache1, out this.m_MaterialPropertyPopupSelection, out this.m_MaterialPropertyPopupInvalidSelections);
         }
         VideoPlayerEditor.HandlePopup(VideoPlayerEditor.s_Styles.materialPropertyContent, this.m_TargetMaterialProperty, this.m_MaterialPropertyPopupContent, this.m_MaterialPropertyPopupSelection);
         if (this.m_MaterialPropertyPopupInvalidSelections > 0 || this.m_MaterialPropertyPopupContent.Length == 0)
         {
             GUILayout.BeginHorizontal(new GUILayoutOption[0]);
             GUILayout.Space(EditorGUIUtility.labelWidth);
             if (this.m_MaterialPropertyPopupContent.Length == 0)
             {
                 if (!flag)
                 {
                     EditorGUILayout.HelpBox(VideoPlayerEditor.s_Styles.rendererMaterialsHaveNoTexPropsHelp, MessageType.Warning);
                 }
                 else
                 {
                     EditorGUILayout.HelpBox(VideoPlayerEditor.s_Styles.someRendererMaterialsHaveNoTexPropsHelp, MessageType.Warning);
                 }
             }
             else if (!flag)
             {
                 EditorGUILayout.HelpBox(VideoPlayerEditor.s_Styles.invalidTexPropSelectionHelp, MessageType.Warning);
             }
             else if (this.m_MaterialPropertyPopupInvalidSelections == 1)
             {
                 EditorGUILayout.HelpBox(VideoPlayerEditor.s_Styles.oneInvalidTexPropSelectionHelp, MessageType.Warning);
             }
             else
             {
                 EditorGUILayout.HelpBox(string.Format(VideoPlayerEditor.s_Styles.someInvalidTexPropSelectionsHelp, this.m_MaterialPropertyPopupInvalidSelections), MessageType.Warning);
             }
             GUILayout.EndHorizontal();
         }
         else
         {
             this.DisplayMultiMaterialInformation(this.m_MaterialPropertyPopupContentHash != materialPropertyPopupHash);
         }
         this.m_MaterialPropertyPopupContentHash = materialPropertyPopupHash;
     }
     EditorGUILayout.EndFadeGroup();
     this.m_ShowAspectRatio.target = (currentRenderMode != VideoRenderMode.MaterialOverride && currentRenderMode != VideoRenderMode.APIOnly);
     if (EditorGUILayout.BeginFadeGroup(this.m_ShowAspectRatio.faded))
     {
         EditorGUILayout.PropertyField(this.m_AspectRatio, VideoPlayerEditor.s_Styles.aspectRatioLabel, new GUILayoutOption[0]);
     }
     EditorGUILayout.EndFadeGroup();
 }
        public override void OnInspectorGUI()
        {
            base.serializedObject.Update();
            this.UpdateShowOptions(false);
            Tree component = ((LightProbeProxyVolume)base.target).GetComponent <Tree>();

            if (component != null)
            {
                EditorGUILayout.HelpBox(LightProbeProxyVolumeEditor.Styles.componentUnsuportedOnTreesNote.text, MessageType.Info);
            }
            else
            {
                EditorGUILayout.Space();
                EditorGUILayout.Popup(this.m_RefreshMode, LightProbeProxyVolumeEditor.Styles.refreshMode, LightProbeProxyVolumeEditor.Styles.refreshModeText, new GUILayoutOption[0]);
                EditorGUILayout.Popup(this.m_BoundingBoxMode, LightProbeProxyVolumeEditor.Styles.bbMode, LightProbeProxyVolumeEditor.Styles.bbModeText, new GUILayoutOption[0]);
                if (EditorGUILayout.BeginFadeGroup(this.m_ShowBoundingBoxOptions.faded))
                {
                    if (base.targets.Length == 1)
                    {
                        this.DoToolbar();
                    }
                    GUILayout.Label(LightProbeProxyVolumeEditor.Styles.bbSettingsText, new GUILayoutOption[0]);
                    EditorGUI.indentLevel++;
                    EditorGUILayout.PropertyField(this.m_BoundingBoxSize, LightProbeProxyVolumeEditor.Styles.sizeText, new GUILayoutOption[0]);
                    EditorGUILayout.PropertyField(this.m_BoundingBoxOrigin, LightProbeProxyVolumeEditor.Styles.originText, new GUILayoutOption[0]);
                    EditorGUI.indentLevel--;
                }
                EditorGUILayout.EndFadeGroup();
                EditorGUILayout.Space();
                GUILayout.Label(LightProbeProxyVolumeEditor.Styles.volumeResolutionText, new GUILayoutOption[0]);
                EditorGUI.indentLevel++;
                EditorGUILayout.Popup(this.m_ResolutionMode, LightProbeProxyVolumeEditor.Styles.resMode, LightProbeProxyVolumeEditor.Styles.resModeText, new GUILayoutOption[0]);
                if (EditorGUILayout.BeginFadeGroup(this.m_ShowResolutionXYZOptions.faded))
                {
                    EditorGUILayout.IntPopup(this.m_ResolutionX, LightProbeProxyVolumeEditor.Styles.volTextureSizes, LightProbeProxyVolumeEditor.Styles.volTextureSizesValues, LightProbeProxyVolumeEditor.Styles.resolutionXText, new GUILayoutOption[]
                    {
                        GUILayout.MinWidth(40f)
                    });
                    EditorGUILayout.IntPopup(this.m_ResolutionY, LightProbeProxyVolumeEditor.Styles.volTextureSizes, LightProbeProxyVolumeEditor.Styles.volTextureSizesValues, LightProbeProxyVolumeEditor.Styles.resolutionYText, new GUILayoutOption[]
                    {
                        GUILayout.MinWidth(40f)
                    });
                    EditorGUILayout.IntPopup(this.m_ResolutionZ, LightProbeProxyVolumeEditor.Styles.volTextureSizes, LightProbeProxyVolumeEditor.Styles.volTextureSizesValues, LightProbeProxyVolumeEditor.Styles.resolutionZText, new GUILayoutOption[]
                    {
                        GUILayout.MinWidth(40f)
                    });
                }
                EditorGUILayout.EndFadeGroup();
                if (EditorGUILayout.BeginFadeGroup(this.m_ShowResolutionProbesOption.faded))
                {
                    GUILayout.BeginHorizontal(new GUILayoutOption[0]);
                    EditorGUILayout.PropertyField(this.m_ResolutionProbesPerUnit, LightProbeProxyVolumeEditor.Styles.resProbesPerUnit, new GUILayoutOption[0]);
                    GUILayout.Label(" probes per unit", EditorStyles.wordWrappedMiniLabel, new GUILayoutOption[0]);
                    GUILayout.EndHorizontal();
                }
                EditorGUILayout.EndFadeGroup();
                EditorGUI.indentLevel--;
                EditorGUILayout.Space();
                EditorGUILayout.Popup(this.m_ProbePositionMode, LightProbeProxyVolumeEditor.Styles.probePositionMode, LightProbeProxyVolumeEditor.Styles.probePositionText, new GUILayoutOption[0]);
                if (EditorGUILayout.BeginFadeGroup(this.m_ShowComponentUnusedWarning.faded) && LightProbeProxyVolume.isFeatureSupported)
                {
                    EditorGUILayout.HelpBox(LightProbeProxyVolumeEditor.Styles.componentUnusedNote.text, MessageType.Warning);
                }
                EditorGUILayout.EndFadeGroup();
                if (EditorGUILayout.BeginFadeGroup(this.m_ShowNoRendererWarning.faded))
                {
                    EditorGUILayout.HelpBox(LightProbeProxyVolumeEditor.Styles.noRendererNode.text, MessageType.Info);
                }
                EditorGUILayout.EndFadeGroup();
                if (EditorGUILayout.BeginFadeGroup(this.m_ShowNoLightProbesWarning.faded))
                {
                    EditorGUILayout.HelpBox(LightProbeProxyVolumeEditor.Styles.noLightProbes.text, MessageType.Info);
                }
                EditorGUILayout.EndFadeGroup();
                base.serializedObject.ApplyModifiedProperties();
            }
        }
示例#7
0
        public override void OnInspectorGUI()
        {
            settings.Update();

            var c = (Camera)target;

            m_ShowBGColorOptions.target = !clearFlagsHasMultipleValues && (c.clearFlags == CameraClearFlags.SolidColor || c.clearFlags == CameraClearFlags.Skybox);
            m_ShowOrthoOptions.target   = !orthographicHasMultipleValues && c.orthographic;

            bool displaySubsystemPresent = displayDescriptors.Count > 0;

            m_ShowTargetEyeOption.target = targetEyeValue != (int)StereoTargetEyeMask.Both || PlayerSettings.virtualRealitySupported || displaySubsystemPresent;

            settings.DrawClearFlags();

            if (EditorGUILayout.BeginFadeGroup(m_ShowBGColorOptions.faded))
            {
                settings.DrawBackgroundColor();
            }
            EditorGUILayout.EndFadeGroup();

            settings.DrawCullingMask();

            EditorGUILayout.Space();

            settings.DrawProjection();

            settings.DrawClippingPlanes();

            settings.DrawNormalizedViewPort();

            EditorGUILayout.Space();
            settings.DrawDepth();
            settings.DrawRenderingPath();
            if (m_ShowOrthoOptions.target && wantDeferredRendering)
            {
                EditorGUILayout.HelpBox("Deferred rendering does not work with Orthographic camera, will use Forward.",
                                        MessageType.Warning, true);
            }

            settings.DrawTargetTexture(wantDeferredRendering);
            settings.DrawOcclusionCulling();
            settings.DrawHDR();
            settings.DrawMSAA();
            settings.DrawDynamicResolution();

            foreach (Camera camera in targets)
            {
                if (camera != null)
                {
                    Settings.DrawCameraWarnings(camera);
                }
            }

            settings.DrawVR();
            EditorGUILayout.Space();
            settings.DrawMultiDisplay();

            if (EditorGUILayout.BeginFadeGroup(m_ShowTargetEyeOption.faded))
            {
                settings.DrawTargetEye();
            }
            EditorGUILayout.EndFadeGroup();

            DepthTextureModeGUI();
            CommandBufferGUI();

            serializedObject.ApplyModifiedProperties();
        }
示例#8
0
        public override void OnInspectorGUI()
        {
            if (s_Styles == null)
            {
                s_Styles = new Styles();
            }
            base.serializedObject.Update();
            this.UpdateShowOptions(false);
            EditorGUILayout.PropertyField(this.m_Type, new GUILayoutOption[0]);
            if (EditorGUILayout.BeginFadeGroup(1f - this.m_ShowAreaOptions.faded))
            {
                EditorGUILayout.IntPopup(this.m_Lightmapping, s_Styles.LightmappingModes, s_Styles.LightmappingModeValues, s_Styles.LightmappingModeLabel, new GUILayoutOption[0]);
                if (EditorGUILayout.BeginFadeGroup(this.m_ShowBakingWarning.faded))
                {
                    EditorGUILayout.HelpBox(EditorGUIUtility.TextContent("Enable Baked GI from Lighting window to use Baked or Mixed.").text, MessageType.Warning, false);
                }
                EditorGUILayout.EndFadeGroup();
            }
            EditorGUILayout.EndFadeGroup();
            EditorGUILayout.Space();
            float num = !((!this.m_ShowDirOptions.isAnimating || !this.m_ShowAreaOptions.isAnimating) ? false : (this.m_ShowDirOptions.target ? true : this.m_ShowAreaOptions.target)) ? (1f - Mathf.Max(this.m_ShowDirOptions.faded, this.m_ShowAreaOptions.faded)) : 0f;

            if (EditorGUILayout.BeginFadeGroup(num))
            {
                EditorGUILayout.PropertyField(this.m_Range, new GUILayoutOption[0]);
            }
            EditorGUILayout.EndFadeGroup();
            if (EditorGUILayout.BeginFadeGroup(this.m_ShowSpotOptions.faded))
            {
                EditorGUILayout.Slider(this.m_SpotAngle, 1f, 179f, new GUILayoutOption[0]);
            }
            EditorGUILayout.EndFadeGroup();
            if (EditorGUILayout.BeginFadeGroup(this.m_ShowAreaOptions.faded))
            {
                EditorGUILayout.PropertyField(this.m_AreaSizeX, EditorGUIUtility.TextContent("Width"), new GUILayoutOption[0]);
                EditorGUILayout.PropertyField(this.m_AreaSizeY, EditorGUIUtility.TextContent("Height"), new GUILayoutOption[0]);
            }
            EditorGUILayout.EndFadeGroup();
            EditorGUILayout.PropertyField(this.m_Color, new GUILayoutOption[0]);
            EditorGUILayout.Slider(this.m_Intensity, 0f, 8f, new GUILayoutOption[0]);
            EditorGUILayout.Slider(this.m_BounceIntensity, 0f, 8f, s_Styles.LightBounceIntensity, new GUILayoutOption[0]);
            if (EditorGUILayout.BeginFadeGroup(this.m_ShowIndirectWarning.faded))
            {
                EditorGUILayout.HelpBox(EditorGUIUtility.TextContent("Currently realtime indirect bounce light shadowing for spot and point lights is not supported.").text, MessageType.Warning, false);
            }
            EditorGUILayout.EndFadeGroup();
            this.ShadowsGUI();
            if (EditorGUILayout.BeginFadeGroup(this.m_ShowRuntimeOptions.faded))
            {
                EditorGUILayout.PropertyField(this.m_Cookie, new GUILayoutOption[0]);
            }
            EditorGUILayout.EndFadeGroup();
            if (EditorGUILayout.BeginFadeGroup(this.m_ShowRuntimeOptions.faded * this.m_ShowDirOptions.faded))
            {
                EditorGUILayout.PropertyField(this.m_CookieSize, new GUILayoutOption[0]);
            }
            EditorGUILayout.EndFadeGroup();
            EditorGUILayout.PropertyField(this.m_Halo, new GUILayoutOption[0]);
            EditorGUILayout.PropertyField(this.m_Flare, new GUILayoutOption[0]);
            EditorGUILayout.PropertyField(this.m_RenderMode, new GUILayoutOption[0]);
            EditorGUILayout.PropertyField(this.m_CullingMask, new GUILayoutOption[0]);
            EditorGUILayout.Space();
            if ((SceneView.currentDrawingSceneView != null) && !SceneView.currentDrawingSceneView.m_SceneLighting)
            {
                EditorGUILayout.HelpBox(EditorGUIUtility.TextContent("One of your scene views has lighting disabled, please keep this in mind when editing lighting.").text, MessageType.Warning, false);
            }
            base.serializedObject.ApplyModifiedProperties();
        }
示例#9
0
        private void FrameSettingsGUI(int platformIndex, MultiTargetSettingState multiState)
        {
            EditorGUI.showMixedValue = multiState.mixedResizeMode;
            EditorGUI.BeginChangeCheck();
            VideoResizeMode resizeMode = (VideoResizeMode)EditorGUILayout.Popup(s_Styles.dimensionsContent, (int)multiState.firstResizeMode, GetResizeModeList().ToArray());

            EditorGUI.showMixedValue = false;
            if (EditorGUI.EndChangeCheck())
            {
                for (int i = 0; i < m_TargetSettings.GetLength(0); i++)
                {
                    if (m_TargetSettings[i, platformIndex].settings != null)
                    {
                        m_TargetSettings[i, platformIndex].settings.resizeMode = resizeMode;
                        m_ModifiedTargetSettings = true;
                    }
                }
            }

            // First item is "Original".  Options appear if another resize mode is chosen.
            m_ShowResizeModeOptions.target = resizeMode != VideoResizeMode.OriginalSize;
            if (EditorGUILayout.BeginFadeGroup(m_ShowResizeModeOptions.faded))
            {
                EditorGUI.indentLevel++;

                if (resizeMode == VideoResizeMode.CustomSize)
                {
                    EditorGUI.showMixedValue = multiState.mixedCustomWidth;
                    EditorGUI.BeginChangeCheck();
                    int customWidth = EditorGUILayout.IntField(s_Styles.widthContent, multiState.firstCustomWidth);
                    customWidth = Mathf.Clamp(customWidth, kMinCustomWidth, kMaxCustomWidth);
                    EditorGUI.showMixedValue = false;
                    if (EditorGUI.EndChangeCheck())
                    {
                        for (int i = 0; i < m_TargetSettings.GetLength(0); i++)
                        {
                            if (m_TargetSettings[i, platformIndex].settings != null)
                            {
                                m_TargetSettings[i, platformIndex].settings.customWidth = customWidth;
                                m_ModifiedTargetSettings = true;
                            }
                        }
                    }

                    EditorGUI.showMixedValue = multiState.mixedCustomHeight;
                    EditorGUI.BeginChangeCheck();
                    int customHeight = EditorGUILayout.IntField(s_Styles.heightContent, multiState.firstCustomHeight);
                    customHeight             = Mathf.Clamp(customHeight, kMinCustomHeight, kMaxCustomHeight);
                    EditorGUI.showMixedValue = false;
                    if (EditorGUI.EndChangeCheck())
                    {
                        for (int i = 0; i < m_TargetSettings.GetLength(0); i++)
                        {
                            if (m_TargetSettings[i, platformIndex].settings != null)
                            {
                                m_TargetSettings[i, platformIndex].settings.customHeight = customHeight;
                                m_ModifiedTargetSettings = true;
                            }
                        }
                    }
                }

                EditorGUI.showMixedValue = multiState.mixedAspectRatio;
                EditorGUI.BeginChangeCheck();
                VideoEncodeAspectRatio aspectRatio = (VideoEncodeAspectRatio)EditorGUILayout.EnumPopup(s_Styles.aspectRatioContent, multiState.firstAspectRatio);
                EditorGUI.showMixedValue = false;
                if (EditorGUI.EndChangeCheck())
                {
                    for (int i = 0; i < m_TargetSettings.GetLength(0); i++)
                    {
                        if (m_TargetSettings[i, platformIndex].settings != null)
                        {
                            m_TargetSettings[i, platformIndex].settings.aspectRatio = aspectRatio;
                            m_ModifiedTargetSettings = true;
                        }
                    }
                }

                EditorGUI.indentLevel--;
            }

            EditorGUILayout.EndFadeGroup();
        }
        public override void OnInspectorGUI()
        {
            var body = target as Rigidbody2D;

            serializedObject.Update();

            EditorGUILayout.PropertyField(m_BodyType);
            EditorGUILayout.PropertyField(m_Material);

            // Provide the user some information when simulation is turned off.
            EditorGUILayout.PropertyField(m_Simulated);
            if (!m_Simulated.boolValue && !m_Simulated.hasMultipleDifferentValues)
            {
                EditorGUILayout.HelpBox("The body has now been taken out of the simulation along with any attached colliders, joints or effectors.", MessageType.Info);
            }


            // Can only multi-edit if we have the same body-type.
            if (m_BodyType.hasMultipleDifferentValues)
            {
                EditorGUILayout.HelpBox("Cannot edit properties that are body type specific when the selection contains different body types.", MessageType.Info);
            }
            else
            {
                // Non-static options.
                m_ShowIsStatic.target = body.bodyType != RigidbodyType2D.Static;
                if (EditorGUILayout.BeginFadeGroup(m_ShowIsStatic.faded))
                {
                    // Kinematic options.
                    m_ShowIsKinematic.target = body.bodyType != RigidbodyType2D.Kinematic;
                    if (EditorGUILayout.BeginFadeGroup(m_ShowIsKinematic.faded))
                    {
                        // Collider Mass.
                        EditorGUILayout.PropertyField(m_UseAutoMass);

                        // Only show mass property if selected objects have the same useAutoMass value.
                        if (!m_UseAutoMass.hasMultipleDifferentValues)
                        {
                            // If we're using auto-mass but either the object is part of a prefab parent or is not active then we cannot show the calculated mass value.
                            if (m_UseAutoMass.boolValue && targets.Any(x => PrefabUtility.IsPartOfPrefabAsset(x) || !(x as Rigidbody2D).gameObject.activeInHierarchy))
                            {
                                EditorGUILayout.HelpBox("The auto mass value cannot be displayed for a prefab or if the object is not active.  The value will be calculated for a prefab instance and when the object is active.", MessageType.Info);
                            }
                            else
                            {
                                EditorGUI.BeginDisabledGroup(body.useAutoMass);
                                EditorGUILayout.PropertyField(m_Mass);
                                EditorGUI.EndDisabledGroup();
                            }
                        }

                        EditorGUILayout.PropertyField(m_LinearDrag);
                        EditorGUILayout.PropertyField(m_AngularDrag);
                        EditorGUILayout.PropertyField(m_GravityScale);
                    }
                    EditorGUILayout.EndFadeGroup();

                    if (!m_ShowIsKinematic.target)
                    {
                        EditorGUILayout.PropertyField(m_UseFullKinematicContacts);
                    }

                    EditorGUILayout.PropertyField(m_CollisionDetection);
                    EditorGUILayout.PropertyField(m_SleepingMode);
                    EditorGUILayout.PropertyField(m_Interpolate);
                    if (targets.Any(x => (x as Rigidbody2D).interpolation != RigidbodyInterpolation2D.None))
                    {
                        if (Physics2D.simulationMode == SimulationMode2D.Update)
                        {
                            EditorGUILayout.HelpBox("The physics simulation mode is set to run per-frame. Any interpolation mode will be ignored and can be set to 'None'.", MessageType.Info);
                        }

                        if (Physics2D.simulationMode == SimulationMode2D.Script)
                        {
                            EditorGUILayout.HelpBox("The physics simulation mode is set to run manually in the scripts. Some or all selected Rigidbody2D are using an interpolation mode other than 'None' which will be executed per-frame. If the manual simulation is being run per-frame then the interpolation mode should be set to 'None'.", MessageType.Info);
                        }
                    }

                    Rect position = EditorGUILayout.GetControlRect();
                    EditorGUI.BeginProperty(position, null, m_Constraints);
                    m_Constraints.isExpanded = EditorGUI.Foldout(position, m_Constraints.isExpanded, m_Constraints.displayName, true);
                    EditorGUI.EndProperty();

                    var constraints = (RigidbodyConstraints2D)m_Constraints.intValue;
                    if (m_Constraints.isExpanded)
                    {
                        EditorGUI.indentLevel++;
                        ToggleFreezePosition(constraints, m_FreezePositionLabel, 0, 1);
                        ToggleFreezeRotation(constraints, m_FreezeRotationLabel, 2);
                        EditorGUI.indentLevel--;
                    }
                }
                EditorGUILayout.EndFadeGroup();
            }

            ShowLayerOverridesProperties();
            ShowBodyInfoProperties();

            serializedObject.ApplyModifiedProperties();
        }
示例#11
0
 public override void OnInspectorGUI()
 {
     base.serializedObject.Update();
     if (this.m_AllRoot)
     {
         EditorGUILayout.PropertyField(this.m_RenderMode, new GUILayoutOption[0]);
         this.m_OverlayMode.target = this.m_RenderMode.intValue == 0;
         this.m_CameraMode.target  = this.m_RenderMode.intValue == 1;
         this.m_WorldMode.target   = this.m_RenderMode.intValue == 2;
         EditorGUI.indentLevel++;
         if (EditorGUILayout.BeginFadeGroup(this.m_OverlayMode.faded))
         {
             EditorGUILayout.PropertyField(this.m_PixelPerfect, new GUILayoutOption[0]);
             EditorGUILayout.PropertyField(this.m_SortingOrder, this.sortingOrder, new GUILayoutOption[0]);
             GUIContent[] displayNames = DisplayUtility.GetDisplayNames();
             EditorGUILayout.IntPopup(this.m_TargetDisplay, displayNames, DisplayUtility.GetDisplayIndices(), this.targetDisplay, new GUILayoutOption[0]);
         }
         EditorGUILayout.EndFadeGroup();
         if (EditorGUILayout.BeginFadeGroup(this.m_CameraMode.faded))
         {
             EditorGUILayout.PropertyField(this.m_PixelPerfect, new GUILayoutOption[0]);
             EditorGUILayout.PropertyField(this.m_Camera, this.renderCamera, new GUILayoutOption[0]);
             if (this.m_Camera.objectReferenceValue != null)
             {
                 EditorGUILayout.PropertyField(this.m_PlaneDistance, new GUILayoutOption[0]);
             }
             EditorGUILayout.Space();
             if (this.m_Camera.objectReferenceValue != null)
             {
                 EditorGUILayout.SortingLayerField(this.m_SortingLayerStyle, this.m_SortingLayerID, EditorStyles.popup, EditorStyles.label);
             }
             EditorGUILayout.PropertyField(this.m_SortingOrder, this.m_SortingOrderStyle, new GUILayoutOption[0]);
             if (this.m_Camera.objectReferenceValue == null)
             {
                 EditorGUILayout.HelpBox("Screen Space - Camera with no specified camera acts like a Overlay Canvas", MessageType.Warning);
             }
         }
         EditorGUILayout.EndFadeGroup();
         if (EditorGUILayout.BeginFadeGroup(this.m_WorldMode.faded))
         {
             EditorGUILayout.PropertyField(this.m_Camera, this.eventCamera, new GUILayoutOption[0]);
             EditorGUILayout.Space();
             EditorGUILayout.SortingLayerField(this.m_SortingLayerStyle, this.m_SortingLayerID, EditorStyles.popup);
             EditorGUILayout.PropertyField(this.m_SortingOrder, this.m_SortingOrderStyle, new GUILayoutOption[0]);
         }
         EditorGUILayout.EndFadeGroup();
         EditorGUI.indentLevel--;
     }
     else if (this.m_AllNested)
     {
         EditorGUI.BeginChangeCheck();
         this.pixelPerfect = (PixelPerfect)EditorGUILayout.EnumPopup("Pixel Perfect", this.pixelPerfect, new GUILayoutOption[0]);
         if (EditorGUI.EndChangeCheck())
         {
             if (this.pixelPerfect == PixelPerfect.Inherit)
             {
                 this.m_PixelPerfectOverride.boolValue = false;
             }
             else if (this.pixelPerfect == PixelPerfect.Off)
             {
                 this.m_PixelPerfectOverride.boolValue = true;
                 this.m_PixelPerfect.boolValue         = false;
             }
             else
             {
                 this.m_PixelPerfectOverride.boolValue = true;
                 this.m_PixelPerfect.boolValue         = true;
             }
         }
         EditorGUILayout.PropertyField(this.m_OverrideSorting, new GUILayoutOption[0]);
         this.m_SortingOverride.target = this.m_OverrideSorting.boolValue;
         if (EditorGUILayout.BeginFadeGroup(this.m_SortingOverride.faded))
         {
             if (this.m_AllOverlay)
             {
                 EditorGUILayout.PropertyField(this.m_SortingOrder, this.sortingOrder, new GUILayoutOption[0]);
             }
             else if (this.m_NoneOverlay)
             {
                 EditorGUILayout.SortingLayerField(this.m_SortingLayerStyle, this.m_SortingLayerID, EditorStyles.popup);
                 EditorGUILayout.PropertyField(this.m_SortingOrder, this.m_SortingOrderStyle, new GUILayoutOption[0]);
             }
         }
         EditorGUILayout.EndFadeGroup();
     }
     else
     {
         GUILayout.Label(s_RootAndNestedMessage, EditorStyles.helpBox, new GUILayoutOption[0]);
     }
     base.serializedObject.ApplyModifiedProperties();
 }
示例#12
0
        private void BuiltinCustomSplashScreenGUI()
        {
            EditorGUILayout.LabelField(k_Texts.splashTitle, EditorStyles.boldLabel);

            using (new EditorGUI.DisabledScope(!licenseAllowsDisabling))
            {
                EditorGUILayout.PropertyField(m_ShowUnitySplashScreen, k_Texts.showSplash);
                if (!m_ShowUnitySplashScreen.boolValue)
                {
                    return;
                }
            }

            GUIContent buttonLabel       = SplashScreen.isFinished ? k_Texts.previewSplash : k_Texts.cancelPreviewSplash;
            Rect       previewButtonRect = GUILayoutUtility.GetRect(buttonLabel, "button");

            previewButtonRect = EditorGUI.PrefixLabel(previewButtonRect, new GUIContent(" "));
            if (GUI.Button(previewButtonRect, buttonLabel))
            {
                if (SplashScreen.isFinished)
                {
                    SplashScreen.Begin();
                    PlayModeView.RepaintAll();
                    var playModeView = PlayModeView.GetMainPlayModeView();
                    if (playModeView)
                    {
                        playModeView.Focus();
                    }
                    EditorApplication.update += PollSplashState;
                }
                else
                {
                    SplashScreen.Stop(SplashScreen.StopBehavior.StopImmediate);
                    EditorApplication.update -= PollSplashState;
                }

                GameView.RepaintAll();
            }

            EditorGUILayout.PropertyField(m_SplashScreenLogoStyle, k_Texts.splashStyle);

            // Animation
            EditorGUILayout.PropertyField(m_SplashScreenAnimation, k_Texts.animate);
            m_ShowAnimationControlsAnimator.target = m_SplashScreenAnimation.intValue == (int)PlayerSettings.SplashScreen.AnimationMode.Custom;

            if (EditorGUILayout.BeginFadeGroup(m_ShowAnimationControlsAnimator.faded))
            {
                EditorGUI.indentLevel++;
                EditorGUILayout.Slider(m_SplashScreenLogoAnimationZoom, 0.0f, 1.0f, k_Texts.logoZoom);
                EditorGUILayout.Slider(m_SplashScreenBackgroundAnimationZoom, 0.0f, 1.0f, k_Texts.backgroundZoom);
                EditorGUI.indentLevel--;
            }
            EditorGUILayout.EndFadeGroup();

            EditorGUILayout.Space();

            // Logos
            EditorGUILayout.LabelField(k_Texts.logosTitle, EditorStyles.boldLabel);
            using (new EditorGUI.DisabledScope(!Application.HasProLicense()))
            {
                EditorGUI.BeginChangeCheck();
                EditorGUILayout.PropertyField(m_ShowUnitySplashLogo, k_Texts.showLogo);
                if (EditorGUI.EndChangeCheck())
                {
                    if (!m_ShowUnitySplashLogo.boolValue)
                    {
                        RemoveUnityLogoFromLogosList();
                    }
                    else if (m_SplashScreenDrawMode.intValue == (int)PlayerSettings.SplashScreen.DrawMode.AllSequential)
                    {
                        AddUnityLogoToLogosList();
                    }
                }

                m_ShowLogoControlsAnimator.target = m_ShowUnitySplashLogo.boolValue;
            }

            if (EditorGUILayout.BeginFadeGroup(m_ShowLogoControlsAnimator.faded))
            {
                EditorGUI.BeginChangeCheck();
                var oldDrawmode = m_SplashScreenDrawMode.intValue;
                EditorGUILayout.PropertyField(m_SplashScreenDrawMode, k_Texts.drawMode);
                if (oldDrawmode != m_SplashScreenDrawMode.intValue)
                {
                    if (m_SplashScreenDrawMode.intValue == (int)PlayerSettings.SplashScreen.DrawMode.UnityLogoBelow)
                    {
                        RemoveUnityLogoFromLogosList();
                    }
                    else
                    {
                        AddUnityLogoToLogosList();
                    }
                }
            }
            EditorGUILayout.EndFadeGroup();

            m_LogoList.DoLayoutList();
            EditorGUILayout.Space();

            // Background
            EditorGUILayout.LabelField(k_Texts.backgroundTitle, EditorStyles.boldLabel);
            EditorGUILayout.Slider(m_SplashScreenOverlayOpacity, Application.HasProLicense() ? k_MinProEditionOverlayOpacity : k_MinPersonalEditionOverlayOpacity, 1.0f, k_Texts.overlayOpacity);
            m_ShowBackgroundColorAnimator.target = m_SplashScreenBackgroundLandscape.objectReferenceValue == null;
            if (EditorGUILayout.BeginFadeGroup(m_ShowBackgroundColorAnimator.faded))
            {
                EditorGUILayout.PropertyField(m_SplashScreenBackgroundColor, k_Texts.backgroundColor);
            }
            EditorGUILayout.EndFadeGroup();

            EditorGUILayout.PropertyField(m_SplashScreenBlurBackground, k_Texts.blurBackground);
            EditorGUI.BeginChangeCheck();
            ObjectReferencePropertyField <Sprite>(m_SplashScreenBackgroundLandscape, k_Texts.backgroundImage);
            if (EditorGUI.EndChangeCheck() && m_SplashScreenBackgroundLandscape.objectReferenceValue == null)
            {
                m_SplashScreenBackgroundPortrait.objectReferenceValue = null;
            }

            using (new EditorGUI.DisabledScope(m_SplashScreenBackgroundLandscape.objectReferenceValue == null))
            {
                ObjectReferencePropertyField <Sprite>(m_SplashScreenBackgroundPortrait, k_Texts.backgroundPortraitImage);
            }
        }
示例#13
0
        private void AllRootCanvases()
        {
            if (VREditor.GetVREnabledOnTargetGroup(BuildPipeline.GetBuildTargetGroup(EditorUserBuildSettings.activeBuildTarget)) && (m_RenderMode.enumValueIndex == (int)RenderMode.ScreenSpaceOverlay))
            {
                EditorGUILayout.HelpBox("Using a render mode of ScreenSpaceOverlay while VR is enabled will cause the Canvas to continue to incur a rendering cost, even though the Canvas will not be visible in VR.", MessageType.Warning);
            }

            EditorGUI.BeginChangeCheck();
            EditorGUILayout.PropertyField(m_RenderMode);
            if (EditorGUI.EndChangeCheck())
            {
                var rectTransforms = targets.Select(c => (c as Canvas).transform).ToArray();
                Undo.RegisterCompleteObjectUndo(rectTransforms, "Modified RectTransform Values");
                serializedObject.ApplyModifiedProperties();
                foreach (Canvas canvas in targets)
                {
                    canvas.UpdateCanvasRectTransform(true);
                }
                GUIUtility.ExitGUI();
            }

            m_OverlayMode.target = m_RenderMode.intValue == 0;
            m_CameraMode.target  = m_RenderMode.intValue == 1;
            m_WorldMode.target   = m_RenderMode.intValue == 2;

            EditorGUI.indentLevel++;
            if (EditorGUILayout.BeginFadeGroup(m_OverlayMode.faded))
            {
                DoPixelPerfectGUIForRoot();

                EditorGUILayout.PropertyField(m_SortingOrder, Styles.sortingOrder);
                GUIContent[] displayNames = DisplayUtility.GetDisplayNames();
                EditorGUILayout.IntPopup(m_TargetDisplay, displayNames, DisplayUtility.GetDisplayIndices(), Styles.targetDisplay);
            }
            EditorGUILayout.EndFadeGroup();

            if (EditorGUILayout.BeginFadeGroup(m_CameraMode.faded))
            {
                DoPixelPerfectGUIForRoot();

                EditorGUILayout.PropertyField(m_Camera, Styles.renderCamera);

                if (m_Camera.objectReferenceValue == null)
                {
                    EditorGUILayout.HelpBox("A Screen Space Canvas with no specified camera acts like an Overlay Canvas.",
                                            MessageType.Warning);
                }

                if (m_Camera.objectReferenceValue != null)
                {
                    EditorGUILayout.PropertyField(m_PlaneDistance);
                    EditorGUILayout.PropertyField(m_UpdateRectTransformForStandalone, Styles.standaloneRenderResize);
                }

                EditorGUILayout.Space();

                if (m_Camera.objectReferenceValue != null)
                {
                    EditorGUILayout.SortingLayerField(Styles.m_SortingLayerStyle, m_SortingLayerID, EditorStyles.popup, EditorStyles.label);
                }
                EditorGUILayout.PropertyField(m_SortingOrder, Styles.m_SortingOrderStyle);
            }
            EditorGUILayout.EndFadeGroup();

            if (EditorGUILayout.BeginFadeGroup(m_WorldMode.faded))
            {
                EditorGUILayout.PropertyField(m_Camera, Styles.eventCamera);

                if (m_Camera.objectReferenceValue == null)
                {
                    EditorGUILayout.HelpBox("A World Space Canvas with no specified Event Camera may not register UI events correctly.",
                                            MessageType.Warning);
                }

                EditorGUILayout.Space();
                EditorGUILayout.SortingLayerField(Styles.m_SortingLayerStyle, m_SortingLayerID, EditorStyles.popup);
                EditorGUILayout.PropertyField(m_SortingOrder, Styles.m_SortingOrderStyle);
            }
            EditorGUILayout.EndFadeGroup();
            EditorGUI.indentLevel--;
        }
示例#14
0
        private void HandleAudio()
        {
            EditorGUILayout.Space();
            EditorGUILayout.PropertyField(m_AudioOutputMode, s_Styles.audioOutputModeContent);

            m_ShowAudioControls.target = (VideoAudioOutputMode)m_AudioOutputMode.intValue != VideoAudioOutputMode.None;
            if (EditorGUILayout.BeginFadeGroup(m_ShowAudioControls.faded))
            {
                // FIXME: Due to a bug in the behaviour of the widgets used in
                // this multi-selection-capable code, we are disabling
                // multi-select editing for now.  The array of widgets being
                // constructed ends up being garbled (no crash, just incorrect
                // content).  After discussing with @shawn, it was agreed to
                // handle this bug separately and disable multi-editing here for
                // the time being.
                if (serializedObject.isEditingMultipleObjects)
                {
                    EditorGUILayout.HelpBox(s_Styles.audioControlsNotEditableHelp, MessageType.Warning, false);
                }
                else if (m_AudioOutputMode.hasMultipleDifferentValues)
                {
                    EditorGUILayout.HelpBox(s_Styles.selectUniformAudioOutputModeHelp, MessageType.Warning, false);
                }
                else
                {
                    ushort trackCountBefore             = (ushort)m_ControlledAudioTrackCount.intValue;
                    bool   useControlledAudioTrackCount = HandleControlledAudioTrackCount();
                    if (useControlledAudioTrackCount && m_ControlledAudioTrackCount.hasMultipleDifferentValues)
                    {
                        EditorGUILayout.HelpBox(s_Styles.selectUniformAudioTracksHelp, MessageType.Warning, false);
                    }
                    else
                    {
                        VideoAudioOutputMode audioOutputMode = (VideoAudioOutputMode)m_AudioOutputMode.intValue;

                        // VideoPlayer::CheckConsistency keeps the array sizes in
                        // sync with the (possible) change done in
                        // HandleControlledAudioTrackCount().  But this adjustment is
                        // only done later so we conservatively only iterate over the
                        // smallest known number of tracks we know are initialized.
                        ushort trackCount = 0;
                        if (useControlledAudioTrackCount)
                        {
                            trackCount = (ushort)Math.Min(
                                (ushort)m_ControlledAudioTrackCount.intValue, trackCountBefore);
                            trackCount = (ushort)Math.Min(trackCount, m_EnabledAudioTracks.arraySize);
                        }
                        else
                        {
                            var clip = ((VideoPlayer)target).clip;
                            if (clip != null)
                            {
                                trackCount = clip.audioTrackCount;
                            }
                        }

                        for (ushort trackIdx = 0; trackIdx < trackCount; ++trackIdx)
                        {
                            EditorGUILayout.PropertyField(
                                m_EnabledAudioTracks.GetArrayElementAtIndex(trackIdx),
                                GetAudioTrackEnabledContent(trackIdx));

                            EditorGUI.indentLevel++;
                            if (audioOutputMode == VideoAudioOutputMode.AudioSource)
                            {
                                var  property = m_TargetAudioSources.GetArrayElementAtIndex(trackIdx);
                                Rect rect     = EditorGUILayout.GetControlRect();
                                int  id       = GUIUtility.GetControlID(Styles.ObjectFieldControlID, FocusType.Keyboard, rect);
                                var  label    = EditorGUI.BeginProperty(rect, s_Styles.audioSourceContent, property);
                                rect = EditorGUI.PrefixLabel(rect, id, label);
                                EditorGUI.BeginChangeCheck();

                                var result = EditorGUI.DoObjectField(rect, rect, id, property.objectReferenceValue, typeof(AudioSource), null, null, true, EditorStyles.objectField);
                                if (EditorGUI.EndChangeCheck())
                                {
                                    if (!EditorUtility.IsPersistent(result))
                                    {
                                        property.objectReferenceValue = result;
                                    }
                                    else
                                    {
                                        Debug.LogWarning("Invalid AudioSource for VideoPlayer. Use an instance of an AudioSource in the scene.");
                                    }
                                }
                            }
                            else if (audioOutputMode == VideoAudioOutputMode.Direct)
                            {
                                EditorGUILayout.PropertyField(
                                    m_DirectAudioMutes.GetArrayElementAtIndex(trackIdx),
                                    s_Styles.muteLabel);
                                EditorGUILayout.Slider(
                                    m_DirectAudioVolumes.GetArrayElementAtIndex(trackIdx), 0.0f, 1.0f,
                                    s_Styles.volumeLabel);
                            }
                            EditorGUI.indentLevel--;
                        }
                    }
                }
            }
            EditorGUILayout.EndFadeGroup();
        }
        public override void OnInspectorGUI()
        {
            bool     flag     = base.targets.Length > 1;
            Animator animator = base.target as Animator;

            base.serializedObject.UpdateIfDirtyOrScript();
            this.UpdateShowOptions();
            EditorGUI.BeginChangeCheck();
            RuntimeAnimatorController runtimeAnimatorController = EditorGUILayout.ObjectField("Controller", animator.runtimeAnimatorController, typeof(RuntimeAnimatorController), false, new GUILayoutOption[0]) as RuntimeAnimatorController;

            if (EditorGUI.EndChangeCheck())
            {
                UnityEngine.Object[] targets = base.targets;
                for (int i = 0; i < targets.Length; i++)
                {
                    Animator animator2 = (Animator)targets[i];
                    Undo.RecordObject(animator2, "Changed AnimatorController");
                    animator2.runtimeAnimatorController = runtimeAnimatorController;
                }
                AnimationWindowUtility.ControllerChanged();
            }
            EditorGUILayout.PropertyField(this.m_Avatar, new GUILayoutOption[0]);
            if (animator.supportsOnAnimatorMove && !flag)
            {
                EditorGUILayout.LabelField("Apply Root Motion", "Handled by Script", new GUILayoutOption[0]);
            }
            else
            {
                EditorGUILayout.PropertyField(this.m_ApplyRootMotion, AnimatorInspector.styles.applyRootMotion, new GUILayoutOption[0]);
                if (Event.current.type == EventType.Layout)
                {
                    this.m_IsRootPositionOrRotationControlledByCurves = animator.isRootPositionOrRotationControlledByCurves;
                }
                if (!this.m_ApplyRootMotion.boolValue && this.m_IsRootPositionOrRotationControlledByCurves)
                {
                    EditorGUILayout.HelpBox("Root position or rotation are controlled by curves", MessageType.Info, true);
                }
            }
            EditorGUI.BeginChangeCheck();
            EditorGUILayout.PropertyField(this.m_UpdateMode, AnimatorInspector.styles.updateMode, new GUILayoutOption[0]);
            bool flag2 = EditorGUI.EndChangeCheck();

            EditorGUI.BeginChangeCheck();
            EditorGUILayout.PropertyField(this.m_CullingMode, AnimatorInspector.styles.cullingMode, new GUILayoutOption[0]);
            bool flag3 = EditorGUI.EndChangeCheck();

            if (!flag)
            {
                EditorGUILayout.HelpBox(animator.GetStats(), MessageType.Info, true);
            }
            if (EditorGUILayout.BeginFadeGroup(this.m_ShowWarningMessage.faded))
            {
                EditorGUILayout.HelpBox(this.WarningMessage, MessageType.Warning, true);
            }
            EditorGUILayout.EndFadeGroup();
            base.serializedObject.ApplyModifiedProperties();
            UnityEngine.Object[] targets2 = base.targets;
            for (int j = 0; j < targets2.Length; j++)
            {
                Animator animator3 = (Animator)targets2[j];
                if (flag3)
                {
                    animator3.OnCullingModeChanged();
                }
                if (flag2)
                {
                    animator3.OnUpdateModeChanged();
                }
            }
        }
示例#16
0
        private void BakedGUI(SerializedObject so, bool enableRealtimeGI, SerializedProperty enableBakedGI)
        {
            this.m_ShowBakeSettings = EditorGUILayout.ToggleTitlebar(this.m_ShowBakeSettings, LightingWindow.styles.BakedGILabel, enableBakedGI);
            if (!this.m_ShowBakeSettings)
            {
                return;
            }
            SerializedProperty resolution          = so.FindProperty("m_LightmapEditorSettings.m_Resolution");
            SerializedProperty resolution2         = so.FindProperty("m_LightmapEditorSettings.m_BakeResolution");
            SerializedProperty property            = so.FindProperty("m_LightmapEditorSettings.m_Padding");
            SerializedProperty serializedProperty  = so.FindProperty("m_LightmapEditorSettings.m_AO");
            SerializedProperty serializedProperty2 = so.FindProperty("m_LightmapEditorSettings.m_AOMaxDistance");
            SerializedProperty property2           = so.FindProperty("m_LightmapEditorSettings.m_CompAOExponent");
            SerializedProperty property3           = so.FindProperty("m_LightmapEditorSettings.m_CompAOExponentDirect");
            SerializedProperty property4           = so.FindProperty("m_LightmapEditorSettings.m_TextureCompression");
            SerializedProperty property5           = so.FindProperty("m_LightmapEditorSettings.m_DirectLightInLightProbes");
            SerializedProperty serializedProperty3 = so.FindProperty("m_LightmapEditorSettings.m_FinalGather");
            SerializedProperty property6           = so.FindProperty("m_LightmapEditorSettings.m_FinalGatherRayCount");
            SerializedProperty property7           = so.FindProperty("m_LightmapEditorSettings.m_FinalGatherFiltering");
            SerializedProperty property8           = so.FindProperty("m_LightmapEditorSettings.m_TextureWidth");

            EditorGUI.indentLevel++;
            using (new EditorGUI.DisabledScope(!enableBakedGI.boolValue))
            {
                LightingWindow.DrawLightmapResolutionField(resolution2, LightingWindow.styles.BakeResolution);
                GUILayout.BeginHorizontal(new GUILayoutOption[0]);
                EditorGUILayout.PropertyField(property, LightingWindow.styles.Padding, new GUILayoutOption[0]);
                GUILayout.Label(" texels", LightingWindow.styles.labelStyle, new GUILayoutOption[0]);
                GUILayout.EndHorizontal();
                EditorGUILayout.PropertyField(property4, LightingWindow.s_Styles.TextureCompression, new GUILayoutOption[0]);
                this.m_ShowIndirectResolution.target = !enableRealtimeGI;
                if (EditorGUILayout.BeginFadeGroup(this.m_ShowIndirectResolution.faded))
                {
                    EditorGUILayout.Space();
                    LightingWindow.DrawLightmapResolutionField(resolution, LightingWindow.styles.IndirectResolution);
                    EditorGUILayout.Space();
                }
                EditorGUILayout.EndFadeGroup();
                EditorGUILayout.PropertyField(serializedProperty, LightingWindow.s_Styles.AO, new GUILayoutOption[0]);
                if (serializedProperty.boolValue)
                {
                    EditorGUI.indentLevel++;
                    EditorGUILayout.PropertyField(serializedProperty2, LightingWindow.styles.AOMaxDistance, new GUILayoutOption[0]);
                    if (serializedProperty2.floatValue < 0f)
                    {
                        serializedProperty2.floatValue = 0f;
                    }
                    EditorGUILayout.Slider(property2, 0f, 10f, LightingWindow.styles.AmbientOcclusion, new GUILayoutOption[0]);
                    EditorGUILayout.Slider(property3, 0f, 10f, LightingWindow.styles.AmbientOcclusionDirect, new GUILayoutOption[0]);
                    EditorGUI.indentLevel--;
                }
                EditorGUILayout.PropertyField(serializedProperty3, LightingWindow.s_Styles.FinalGather, new GUILayoutOption[0]);
                if (serializedProperty3.boolValue)
                {
                    EditorGUI.indentLevel++;
                    EditorGUILayout.PropertyField(property6, LightingWindow.styles.FinalGatherRayCount, new GUILayoutOption[0]);
                    EditorGUILayout.PropertyField(property7, LightingWindow.styles.FinalGatherFiltering, new GUILayoutOption[0]);
                    EditorGUI.indentLevel--;
                }
                EditorGUILayout.IntPopup(property8, this.kMaxAtlasSizeStrings, this.kMaxAtlasSizeValues, LightingWindow.styles.MaxAtlasSize, new GUILayoutOption[0]);
                EditorGUILayout.Space();
                EditorGUILayout.LabelField(LightingWindow.styles.LightProbesTitle, new GUILayoutOption[0]);
                EditorGUI.indentLevel++;
                EditorGUILayout.PropertyField(property5, LightingWindow.s_Styles.DirectLightInLightProbes, new GUILayoutOption[0]);
                EditorGUI.indentLevel--;
                EditorGUILayout.Space();
            }
            EditorGUI.indentLevel--;
        }
示例#17
0
        public override void OnInspectorGUI()
        {
            base.serializedObject.Update();
            Camera camera = (Camera)base.target;

            this.m_ShowBGColorOptions.target  = (!this.m_ClearFlags.hasMultipleDifferentValues && (camera.clearFlags == CameraClearFlags.Color || camera.clearFlags == CameraClearFlags.Skybox));
            this.m_ShowOrthoOptions.target    = (!this.m_Orthographic.hasMultipleDifferentValues && camera.orthographic);
            this.m_ShowTargetEyeOption.target = (this.m_TargetEye.intValue != 3 || PlayerSettings.virtualRealitySupported);
            EditorGUILayout.PropertyField(this.m_ClearFlags, new GUILayoutOption[0]);
            if (EditorGUILayout.BeginFadeGroup(this.m_ShowBGColorOptions.faded))
            {
                EditorGUILayout.PropertyField(this.m_BackgroundColor, new GUIContent("Background", "Camera clears the screen to this color before rendering."), new GUILayoutOption[0]);
            }
            EditorGUILayout.EndFadeGroup();
            EditorGUILayout.PropertyField(this.m_CullingMask, new GUILayoutOption[0]);
            EditorGUILayout.Space();
            CameraEditor.ProjectionType projectionType = (!this.m_Orthographic.boolValue) ? CameraEditor.ProjectionType.Perspective : CameraEditor.ProjectionType.Orthographic;
            EditorGUI.BeginChangeCheck();
            EditorGUI.showMixedValue = this.m_Orthographic.hasMultipleDifferentValues;
            projectionType           = (CameraEditor.ProjectionType)EditorGUILayout.EnumPopup("Projection", projectionType, new GUILayoutOption[0]);
            EditorGUI.showMixedValue = false;
            if (EditorGUI.EndChangeCheck())
            {
                this.m_Orthographic.boolValue = (projectionType == CameraEditor.ProjectionType.Orthographic);
            }
            if (!this.m_Orthographic.hasMultipleDifferentValues)
            {
                if (EditorGUILayout.BeginFadeGroup(this.m_ShowOrthoOptions.faded))
                {
                    EditorGUILayout.PropertyField(this.m_OrthographicSize, new GUIContent("Size"), new GUILayoutOption[0]);
                }
                EditorGUILayout.EndFadeGroup();
                if (EditorGUILayout.BeginFadeGroup(1f - this.m_ShowOrthoOptions.faded))
                {
                    EditorGUILayout.Slider(this.m_FieldOfView, 1f, 179f, new GUIContent("Field of View"), new GUILayoutOption[0]);
                }
                EditorGUILayout.EndFadeGroup();
            }
            EditorGUILayout.PropertiesField(EditorGUI.s_ClipingPlanesLabel, this.m_NearAndFarClippingPlanes, EditorGUI.s_NearAndFarLabels, 35f, new GUILayoutOption[0]);
            EditorGUILayout.PropertyField(this.m_NormalizedViewPortRect, this.m_ViewportLabel, new GUILayoutOption[0]);
            EditorGUILayout.Space();
            EditorGUILayout.PropertyField(this.m_Depth, new GUILayoutOption[0]);
            EditorGUILayout.IntPopup(this.m_RenderingPath, CameraEditor.kCameraRenderPaths, CameraEditor.kCameraRenderPathValues, EditorGUIUtility.TempContent("Rendering Path"), new GUILayoutOption[0]);
            if (this.m_ShowOrthoOptions.target && this.wantDeferredRendering)
            {
                EditorGUILayout.HelpBox("Deferred rendering does not work with Orthographic camera, will use Forward.", MessageType.Warning, true);
            }
            EditorGUILayout.PropertyField(this.m_TargetTexture, new GUILayoutOption[0]);
            if (!this.m_TargetTexture.hasMultipleDifferentValues)
            {
                RenderTexture renderTexture = this.m_TargetTexture.objectReferenceValue as RenderTexture;
                if (renderTexture && renderTexture.antiAliasing > 1 && this.wantDeferredRendering)
                {
                    EditorGUILayout.HelpBox("Manual MSAA target set with deferred rendering. This will lead to undefined behavior.", MessageType.Warning, true);
                }
            }
            EditorGUILayout.PropertyField(this.m_OcclusionCulling, new GUILayoutOption[0]);
            EditorGUILayout.PropertyField(this.m_HDR, EditorGUIUtility.TempContent("Allow HDR"), new GUILayoutOption[0]);
            EditorGUILayout.PropertyField(this.m_AllowMSAA, new GUILayoutOption[0]);
            this.DisplayCameraWarnings();
            if (PlayerSettings.virtualRealitySupported)
            {
                EditorGUILayout.PropertyField(this.m_StereoSeparation, new GUILayoutOption[0]);
                EditorGUILayout.PropertyField(this.m_StereoConvergence, new GUILayoutOption[0]);
            }
            if (ModuleManager.ShouldShowMultiDisplayOption())
            {
                int intValue = this.m_TargetDisplay.intValue;
                EditorGUILayout.Space();
                EditorGUILayout.IntPopup(this.m_TargetDisplay, DisplayUtility.GetDisplayNames(), DisplayUtility.GetDisplayIndices(), EditorGUIUtility.TempContent("Target Display"), new GUILayoutOption[0]);
                if (intValue != this.m_TargetDisplay.intValue)
                {
                    GameView.RepaintAll();
                }
            }
            if (EditorGUILayout.BeginFadeGroup(this.m_ShowTargetEyeOption.faded))
            {
                EditorGUILayout.IntPopup(this.m_TargetEye, CameraEditor.kTargetEyes, CameraEditor.kTargetEyeValues, EditorGUIUtility.TempContent("Target Eye"), new GUILayoutOption[0]);
            }
            EditorGUILayout.EndFadeGroup();
            this.DepthTextureModeGUI();
            this.CommandBufferGUI();
            base.serializedObject.ApplyModifiedProperties();
        }
        private void BuiltinCustomSplashScreenGUI()
        {
            EditorGUILayout.LabelField(PlayerSettingsSplashScreenEditor.k_Texts.splashTitle, EditorStyles.boldLabel, new GUILayoutOption[0]);
            using (new EditorGUI.DisabledScope(!PlayerSettingsSplashScreenEditor.licenseAllowsDisabling))
            {
                EditorGUILayout.PropertyField(this.m_ShowUnitySplashScreen, PlayerSettingsSplashScreenEditor.k_Texts.showSplash, new GUILayoutOption[0]);
                if (!this.m_ShowUnitySplashScreen.boolValue)
                {
                    return;
                }
            }
            Rect rect = GUILayoutUtility.GetRect(PlayerSettingsSplashScreenEditor.k_Texts.previewSplash, "button");

            rect = EditorGUI.PrefixLabel(rect, new GUIContent(" "));
            if (GUI.Button(rect, PlayerSettingsSplashScreenEditor.k_Texts.previewSplash))
            {
                SplashScreen.Begin();
                GameView mainGameView = GameView.GetMainGameView();
                if (mainGameView)
                {
                    mainGameView.Focus();
                }
                GameView.RepaintAll();
            }
            EditorGUILayout.PropertyField(this.m_SplashScreenLogoStyle, PlayerSettingsSplashScreenEditor.k_Texts.splashStyle, new GUILayoutOption[0]);
            EditorGUILayout.PropertyField(this.m_SplashScreenAnimation, PlayerSettingsSplashScreenEditor.k_Texts.animate, new GUILayoutOption[0]);
            this.m_ShowAnimationControlsAnimator.target = (this.m_SplashScreenAnimation.intValue == 2);
            if (EditorGUILayout.BeginFadeGroup(this.m_ShowAnimationControlsAnimator.faded))
            {
                EditorGUI.indentLevel++;
                EditorGUILayout.Slider(this.m_SplashScreenLogoAnimationZoom, 0f, 1f, PlayerSettingsSplashScreenEditor.k_Texts.logoZoom, new GUILayoutOption[0]);
                EditorGUILayout.Slider(this.m_SplashScreenBackgroundAnimationZoom, 0f, 1f, PlayerSettingsSplashScreenEditor.k_Texts.backgroundZoom, new GUILayoutOption[0]);
                EditorGUI.indentLevel--;
            }
            EditorGUILayout.EndFadeGroup();
            EditorGUILayout.Space();
            EditorGUILayout.LabelField(PlayerSettingsSplashScreenEditor.k_Texts.logosTitle, EditorStyles.boldLabel, new GUILayoutOption[0]);
            using (new EditorGUI.DisabledScope(!Application.HasProLicense()))
            {
                EditorGUI.BeginChangeCheck();
                EditorGUILayout.PropertyField(this.m_ShowUnitySplashLogo, PlayerSettingsSplashScreenEditor.k_Texts.showLogo, new GUILayoutOption[0]);
                if (EditorGUI.EndChangeCheck())
                {
                    if (!this.m_ShowUnitySplashLogo.boolValue)
                    {
                        this.RemoveUnityLogoFromLogosList();
                    }
                    else if (this.m_SplashScreenDrawMode.intValue == 1)
                    {
                        this.AddUnityLogoToLogosList();
                    }
                    this.m_ShowLogoControlsAnimator.target = this.m_ShowUnitySplashLogo.boolValue;
                }
            }
            if (EditorGUILayout.BeginFadeGroup(this.m_ShowLogoControlsAnimator.faded))
            {
                EditorGUI.indentLevel++;
                EditorGUI.BeginChangeCheck();
                int intValue = this.m_SplashScreenDrawMode.intValue;
                EditorGUILayout.PropertyField(this.m_SplashScreenDrawMode, PlayerSettingsSplashScreenEditor.k_Texts.drawMode, new GUILayoutOption[0]);
                if (intValue != this.m_SplashScreenDrawMode.intValue)
                {
                    if (this.m_SplashScreenDrawMode.intValue == 0)
                    {
                        this.RemoveUnityLogoFromLogosList();
                    }
                    else
                    {
                        this.AddUnityLogoToLogosList();
                    }
                }
                EditorGUI.indentLevel--;
            }
            EditorGUILayout.EndFadeGroup();
            this.m_LogoList.DoLayoutList();
            EditorGUILayout.Space();
            EditorGUILayout.LabelField(PlayerSettingsSplashScreenEditor.k_Texts.backgroundTitle, EditorStyles.boldLabel, new GUILayoutOption[0]);
            EditorGUILayout.Slider(this.m_SplashScreenOverlayOpacity, (!Application.HasProLicense()) ? PlayerSettingsSplashScreenEditor.k_MinPersonalEditionOverlayOpacity : PlayerSettingsSplashScreenEditor.k_MinProEditionOverlayOpacity, 1f, PlayerSettingsSplashScreenEditor.k_Texts.overlayOpacity, new GUILayoutOption[0]);
            this.m_ShowBackgroundColorAnimator.target = (this.m_SplashScreenBackgroundLandscape.objectReferenceValue == null);
            if (EditorGUILayout.BeginFadeGroup(this.m_ShowBackgroundColorAnimator.faded))
            {
                EditorGUILayout.PropertyField(this.m_SplashScreenBackgroundColor, PlayerSettingsSplashScreenEditor.k_Texts.backgroundColor, new GUILayoutOption[0]);
            }
            EditorGUILayout.EndFadeGroup();
            PlayerSettingsSplashScreenEditor.ObjectReferencePropertyField <Sprite>(this.m_SplashScreenBackgroundLandscape, PlayerSettingsSplashScreenEditor.k_Texts.backgroundImage);
            if (GUI.changed && this.m_SplashScreenBackgroundLandscape.objectReferenceValue == null)
            {
                this.m_SplashScreenBackgroundPortrait.objectReferenceValue = null;
            }
            using (new EditorGUI.DisabledScope(this.m_SplashScreenBackgroundLandscape.objectReferenceValue == null))
            {
                PlayerSettingsSplashScreenEditor.ObjectReferencePropertyField <Sprite>(this.m_SplashScreenBackgroundPortrait, PlayerSettingsSplashScreenEditor.k_Texts.backgroundPortraitImage);
            }
        }
示例#19
0
        public override void OnInspectorGUI()
        {
            if (s_Styles == null)
            {
                s_Styles = new Style();
            }

            settings.Update();

            UpdateShowOptions(false);

            // Light type (shape and usage)
            settings.DrawLightType();

            EditorGUILayout.Space();

            // When we are switching between two light types that don't show the range (directional and area lights)
            // we want the fade group to stay hidden.
            //bool keepRangeHidden = m_ShowDirOptions.isAnimating && m_ShowDirOptions.target;
            //float fadeRange = keepRangeHidden ? 0.0f : 1.0f - m_ShowDirOptions.faded;
            // Light Range
            if (EditorGUILayout.BeginFadeGroup(1.0f - m_AnimShowDirOptions.faded))
            {
                settings.DrawRange(m_AnimShowAreaOptions.target);
            }
            EditorGUILayout.EndFadeGroup();

            if (EditorGUILayout.BeginFadeGroup(m_AnimShowSpotOptions.faded))
            {
                settings.DrawSpotAngle();
            }
            EditorGUILayout.EndFadeGroup();

            // Area width & height
            if (EditorGUILayout.BeginFadeGroup(m_AnimShowAreaOptions.faded))
            {
                settings.DrawArea();
            }
            EditorGUILayout.EndFadeGroup();

            settings.DrawColor();

            EditorGUILayout.Space();

            // Baking type
            if (EditorGUILayout.BeginFadeGroup(1.0F - m_AnimShowAreaOptions.faded))
            {
                settings.DrawLightmapping();
            }
            EditorGUILayout.EndFadeGroup();

            settings.DrawIntensity();

            if (EditorGUILayout.BeginFadeGroup(m_AnimShowLightBounceIntensity.faded))
            {
                settings.DrawBounceIntensity();
            }
            EditorGUILayout.EndFadeGroup();

            ShadowsGUI();

            if (EditorGUILayout.BeginFadeGroup(m_AnimShowRuntimeOptions.faded))
            {
                settings.DrawCookie();
            }
            EditorGUILayout.EndFadeGroup();

            // Cookie size also requires directional light
            if (EditorGUILayout.BeginFadeGroup(m_AnimShowRuntimeOptions.faded * m_AnimShowDirOptions.faded))
            {
                settings.DrawCookieSize();
            }
            EditorGUILayout.EndFadeGroup();

            settings.DrawHalo();
            settings.DrawFlare();
            settings.DrawRenderMode();
            settings.DrawCullingMask();

            EditorGUILayout.Space();
            if (SceneView.lastActiveSceneView != null && SceneView.lastActiveSceneView.m_SceneLighting == false)
            {
                EditorGUILayout.HelpBox(s_Styles.DisabledLightWarning.text, MessageType.Warning);
            }

            CommandBufferGUI();

            settings.ApplyModifiedProperties();
            serializedObject.ApplyModifiedProperties();
        }
示例#20
0
        public override void OnInspectorGUI()
        {
            settings.Update();

            var c = (Camera)target;

            m_ShowBGColorOptions.target = !clearFlagsHasMultipleValues && (c.clearFlags == CameraClearFlags.SolidColor || c.clearFlags == CameraClearFlags.Skybox);
            m_ShowOrthoOptions.target   = !orthographicHasMultipleValues && c.orthographic;

            bool displaySubsystemPresent = displayDescriptors.Count > 0;

            m_ShowTargetEyeOption.target = targetEyeValue != (int)StereoTargetEyeMask.Both || VREditor.GetVREnabledOnTargetGroup(BuildPipeline.GetBuildTargetGroup(EditorUserBuildSettings.activeBuildTarget)) || displaySubsystemPresent;

            settings.DrawClearFlags();

            if (EditorGUILayout.BeginFadeGroup(m_ShowBGColorOptions.faded))
            {
                settings.DrawBackgroundColor();
            }
            EditorGUILayout.EndFadeGroup();

            settings.DrawCullingMask();

            EditorGUILayout.Space();

            settings.DrawProjection();

            if (displaySubsystemPresent && targetEyeValue != (int)StereoTargetEyeMask.None && c.orthographic && c.targetTexture == null)
            {
                GUILayout.Label(EditorGUIUtility.TrTextContent("Orthographic projection is not supported when running in XR.", "One or more XR Plug-in providers were detected in your project. Using Orthographic projection is not supported when running in XR and enabling this may cause problems.", EditorGUIUtility.warningIcon));
            }

            settings.DrawClippingPlanes();

            settings.DrawNormalizedViewPort();

            EditorGUILayout.Space();
            settings.DrawDepth();
            settings.DrawRenderingPath();
            if (m_ShowOrthoOptions.target && wantDeferredRendering)
            {
                EditorGUILayout.HelpBox("Deferred rendering does not work with Orthographic camera, will use Forward.",
                                        MessageType.Warning, true);
            }

            settings.DrawTargetTexture(wantDeferredRendering);
            settings.DrawOcclusionCulling();
            settings.DrawHDR();
            settings.DrawMSAA();
            settings.DrawDynamicResolution();

            foreach (Camera camera in targets)
            {
                if (camera != null)
                {
                    Settings.DrawCameraWarnings(camera);
                }
            }

            settings.DrawVR();
            EditorGUILayout.Space();
            settings.DrawMultiDisplay();

            if (EditorGUILayout.BeginFadeGroup(m_ShowTargetEyeOption.faded))
            {
                settings.DrawTargetEye();
            }
            EditorGUILayout.EndFadeGroup();

            DepthTextureModeGUI();
            CommandBufferGUI();

            serializedObject.ApplyModifiedProperties();
        }
        public override void OnInspectorGUI()
        {
            serializedObject.Update();

            UpdateShowOptions(false);

            var tree = ((LightProbeProxyVolume)target).GetComponent <Tree>();

            if (tree != null)
            {
                EditorGUILayout.HelpBox(Styles.componentUnsuportedOnTreesNote.text, MessageType.Info);
                return;
            }

            EditorGUILayout.Space();

            EditorGUILayout.Popup(m_RefreshMode, Styles.refreshMode, Styles.refreshModeText);

            EditorGUILayout.Popup(m_QualityMode, Styles.qualityMode, Styles.qualityText);

            EditorGUILayout.Popup(m_DataFormat, Styles.dataFormat, Styles.dataFormatText);

            EditorGUILayout.Popup(m_BoundingBoxMode, Styles.bbMode, Styles.bbModeText);

            if (EditorGUILayout.BeginFadeGroup(m_ShowBoundingBoxOptions.faded))
            {
                if (targets.Length == 1)
                {
                    DoToolbar();
                }

                GUILayout.Label(Styles.bbSettingsText);

                EditorGUI.indentLevel++;

                EditorGUILayout.PropertyField(m_BoundingBoxSize, Styles.sizeText);
                EditorGUILayout.PropertyField(m_BoundingBoxOrigin, Styles.originText);

                EditorGUI.indentLevel--;
            }
            EditorGUILayout.EndFadeGroup();

            EditorGUILayout.Space();

            GUILayout.Label(Styles.volumeResolutionText);

            EditorGUI.indentLevel++;
            {
                EditorGUILayout.Popup(m_ResolutionMode, Styles.resMode, Styles.resModeText);

                if (EditorGUILayout.BeginFadeGroup(m_ShowResolutionXYZOptions.faded))
                {
                    EditorGUILayout.IntPopup(m_ResolutionX, Styles.volTextureSizes, Styles.volTextureSizesValues, Styles.resolutionXText, GUILayout.MinWidth(40));
                    EditorGUILayout.IntPopup(m_ResolutionY, Styles.volTextureSizes, Styles.volTextureSizesValues, Styles.resolutionYText, GUILayout.MinWidth(40));
                    EditorGUILayout.IntPopup(m_ResolutionZ, Styles.volTextureSizes, Styles.volTextureSizesValues, Styles.resolutionZText, GUILayout.MinWidth(40));
                }
                EditorGUILayout.EndFadeGroup();

                if (EditorGUILayout.BeginFadeGroup(m_ShowResolutionProbesOption.faded))
                {
                    GUILayout.BeginHorizontal();
                    EditorGUILayout.PropertyField(m_ResolutionProbesPerUnit, Styles.resProbesPerUnit);
                    GUILayout.Label(" probes per unit", EditorStyles.wordWrappedMiniLabel);
                    GUILayout.EndHorizontal();
                }
                EditorGUILayout.EndFadeGroup();
            }

            EditorGUI.indentLevel--;

            EditorGUILayout.Space();

            EditorGUILayout.Popup(m_ProbePositionMode, Styles.probePositionMode, Styles.probePositionText);

            if (EditorGUILayout.BeginFadeGroup(m_ShowComponentUnusedWarning.faded) && LightProbeProxyVolume.isFeatureSupported)
            {
                EditorGUILayout.HelpBox(Styles.componentUnusedNote.text, MessageType.Warning);
            }
            EditorGUILayout.EndFadeGroup();

            if (EditorGUILayout.BeginFadeGroup(m_ShowNoRendererWarning.faded))
            {
                EditorGUILayout.HelpBox(Styles.noRendererNode.text, MessageType.Info);
            }
            EditorGUILayout.EndFadeGroup();

            if (EditorGUILayout.BeginFadeGroup(m_ShowNoLightProbesWarning.faded))
            {
                EditorGUILayout.HelpBox(Styles.noLightProbes.text, MessageType.Info);
            }
            EditorGUILayout.EndFadeGroup();

            serializedObject.ApplyModifiedProperties();
        }
示例#22
0
        public override void OnInspectorGUI()
        {
            var body = target as Rigidbody2D;

            serializedObject.Update();

            EditorGUILayout.PropertyField(m_BodyType);
            EditorGUILayout.PropertyField(m_Material);

            // Provide the user some information when simulation is turned off.
            EditorGUILayout.PropertyField(m_Simulated);
            if (!m_Simulated.boolValue && !m_Simulated.hasMultipleDifferentValues)
            {
                EditorGUILayout.HelpBox("The body has now been taken out of the simulation along with any attached colliders, joints or effectors.", MessageType.Info);
            }


            // Can only multi-edit if we have the same body-type.
            if (m_BodyType.hasMultipleDifferentValues)
            {
                EditorGUILayout.HelpBox("Cannot edit properties that are body type specific when the selection contains different body types.", MessageType.Info);
            }
            else
            {
                // Non-static options.
                m_ShowIsStatic.target = body.bodyType != RigidbodyType2D.Static;
                if (EditorGUILayout.BeginFadeGroup(m_ShowIsStatic.faded))
                {
                    // Kinematic options.
                    m_ShowIsKinematic.target = body.bodyType != RigidbodyType2D.Kinematic;
                    if (EditorGUILayout.BeginFadeGroup(m_ShowIsKinematic.faded))
                    {
                        // Collider Mass.
                        EditorGUILayout.PropertyField(m_UseAutoMass);

                        // Only show mass property if selected objects have the same useAutoMass value.
                        if (!m_UseAutoMass.hasMultipleDifferentValues)
                        {
                            // If we're using auto-mass but either the object is part of a prefab parent or is not active then we cannot show the calculated mass value.
                            if (m_UseAutoMass.boolValue && targets.Any(x => PrefabUtility.IsPartOfPrefabAsset(x) || !(x as Rigidbody2D).gameObject.activeInHierarchy))
                            {
                                EditorGUILayout.HelpBox("The auto mass value cannot be displayed for a prefab or if the object is not active.  The value will be calculated for a prefab instance and when the object is active.", MessageType.Info);
                            }
                            else
                            {
                                EditorGUI.BeginDisabledGroup(body.useAutoMass);
                                EditorGUILayout.PropertyField(m_Mass);
                                EditorGUI.EndDisabledGroup();
                            }
                        }

                        EditorGUILayout.PropertyField(m_LinearDrag);
                        EditorGUILayout.PropertyField(m_AngularDrag);
                        EditorGUILayout.PropertyField(m_GravityScale);
                    }
                    EditorGUILayout.EndFadeGroup();

                    if (!m_ShowIsKinematic.target)
                    {
                        EditorGUILayout.PropertyField(m_UseFullKinematicContacts);
                    }

                    EditorGUILayout.PropertyField(m_CollisionDetection);
                    EditorGUILayout.PropertyField(m_SleepingMode);
                    EditorGUILayout.PropertyField(m_Interpolate);

                    GUILayout.BeginHorizontal();
                    m_Constraints.isExpanded = EditorGUILayout.Foldout(m_Constraints.isExpanded, "Constraints", true);
                    GUILayout.EndHorizontal();

                    var constraints = (RigidbodyConstraints2D)m_Constraints.intValue;
                    if (m_Constraints.isExpanded)
                    {
                        EditorGUI.indentLevel++;
                        ToggleFreezePosition(constraints, m_FreezePositionLabel, 0, 1);
                        ToggleFreezeRotation(constraints, m_FreezeRotationLabel, 2);
                        EditorGUI.indentLevel--;
                    }

                    // Provide end-user warning about the equivalence of all constraints on versus no Rigidbody2D component.
                    if (constraints == RigidbodyConstraints2D.FreezeAll)
                    {
                        EditorGUILayout.HelpBox("Rather than turning on all constraints, you may want to consider removing the Rigidbody2D component which makes any colliders static.  This gives far better performance overall.", MessageType.Info);
                    }
                }
                EditorGUILayout.EndFadeGroup();
            }

            serializedObject.ApplyModifiedProperties();

            ShowBodyInfoProperties();
        }
 public override void OnInspectorGUI()
 {
     base.serializedObject.Update();
     if (base.targets.Length == 1)
     {
         this.DoToolbar();
     }
     this.m_ShowProbeModeRealtimeOptions.target = (this.reflectionProbeMode == ReflectionProbeMode.Realtime);
     this.m_ShowProbeModeCustomOptions.target   = (this.reflectionProbeMode == ReflectionProbeMode.Custom);
     EditorGUILayout.IntPopup(this.m_Mode, ReflectionProbeEditor.Styles.reflectionProbeMode, ReflectionProbeEditor.Styles.reflectionProbeModeValues, ReflectionProbeEditor.Styles.typeText, new GUILayoutOption[0]);
     if (!this.m_Mode.hasMultipleDifferentValues)
     {
         EditorGUI.indentLevel++;
         if (EditorGUILayout.BeginFadeGroup(this.m_ShowProbeModeCustomOptions.faded))
         {
             EditorGUILayout.PropertyField(this.m_RenderDynamicObjects, ReflectionProbeEditor.Styles.renderDynamicObjects, new GUILayoutOption[0]);
             this.m_CustomBakedTexture.objectReferenceValue = EditorGUILayout.ObjectField(ReflectionProbeEditor.Styles.customCubemapText, this.m_CustomBakedTexture.objectReferenceValue, typeof(Cubemap), false, new GUILayoutOption[0]);
         }
         EditorGUILayout.EndFadeGroup();
         if (EditorGUILayout.BeginFadeGroup(this.m_ShowProbeModeRealtimeOptions.faded))
         {
             EditorGUILayout.PropertyField(this.m_RefreshMode, ReflectionProbeEditor.Styles.refreshMode, new GUILayoutOption[0]);
             EditorGUILayout.PropertyField(this.m_TimeSlicingMode, ReflectionProbeEditor.Styles.timeSlicing, new GUILayoutOption[0]);
             EditorGUILayout.Space();
         }
         EditorGUILayout.EndFadeGroup();
         EditorGUI.indentLevel--;
     }
     EditorGUILayout.Space();
     GUILayout.Label(ReflectionProbeEditor.Styles.runtimeSettingsHeader, new GUILayoutOption[0]);
     EditorGUI.indentLevel++;
     EditorGUILayout.PropertyField(this.m_Importance, ReflectionProbeEditor.Styles.importanceText, new GUILayoutOption[0]);
     EditorGUILayout.PropertyField(this.m_IntensityMultiplier, ReflectionProbeEditor.Styles.intensityText, new GUILayoutOption[0]);
     EditorGUILayout.PropertyField(this.m_BoxProjection, ReflectionProbeEditor.Styles.boxProjectionText, new GUILayoutOption[0]);
     if (EditorGUILayout.BeginFadeGroup(this.m_ShowBoxOptions.faded))
     {
         EditorGUI.BeginChangeCheck();
         EditorGUILayout.PropertyField(this.m_BoxSize, ReflectionProbeEditor.Styles.sizeText, new GUILayoutOption[0]);
         EditorGUILayout.PropertyField(this.m_BoxOffset, ReflectionProbeEditor.Styles.centerText, new GUILayoutOption[0]);
         if (EditorGUI.EndChangeCheck())
         {
             Vector3 vector3Value  = this.m_BoxOffset.vector3Value;
             Vector3 vector3Value2 = this.m_BoxSize.vector3Value;
             if (this.ValidateAABB(ref vector3Value, ref vector3Value2))
             {
                 this.m_BoxOffset.vector3Value = vector3Value;
                 this.m_BoxSize.vector3Value   = vector3Value2;
             }
         }
     }
     EditorGUILayout.EndFadeGroup();
     EditorGUI.indentLevel--;
     EditorGUILayout.Space();
     GUILayout.Label(ReflectionProbeEditor.Styles.captureCubemapHeaderText, new GUILayoutOption[0]);
     EditorGUI.indentLevel++;
     EditorGUILayout.IntPopup(this.m_Resolution, ReflectionProbeEditor.Styles.renderTextureSizes, ReflectionProbeEditor.Styles.renderTextureSizesValues, ReflectionProbeEditor.Styles.resolutionText, new GUILayoutOption[]
     {
         GUILayout.MinWidth(40f)
     });
     EditorGUILayout.PropertyField(this.m_HDR, new GUILayoutOption[0]);
     EditorGUILayout.PropertyField(this.m_ShadowDistance, new GUILayoutOption[0]);
     EditorGUILayout.IntPopup(this.m_ClearFlags, ReflectionProbeEditor.Styles.clearFlags, ReflectionProbeEditor.Styles.clearFlagsValues, ReflectionProbeEditor.Styles.clearFlagsText, new GUILayoutOption[0]);
     EditorGUILayout.PropertyField(this.m_BackgroundColor, ReflectionProbeEditor.Styles.backgroundColorText, new GUILayoutOption[0]);
     EditorGUILayout.PropertyField(this.m_CullingMask, new GUILayoutOption[0]);
     EditorGUILayout.PropertyField(this.m_UseOcclusionCulling, new GUILayoutOption[0]);
     EditorGUILayout.PropertiesField(EditorGUI.s_ClipingPlanesLabel, this.m_NearAndFarProperties, EditorGUI.s_NearAndFarLabels, 35f, new GUILayoutOption[0]);
     EditorGUI.indentLevel--;
     EditorGUILayout.Space();
     this.DoBakeButton();
     EditorGUILayout.Space();
     base.serializedObject.ApplyModifiedProperties();
 }