private void DisplayControls(UnityEngine.Object target, SceneView sceneView)
        {
            if (!sceneView)
            {
                return;
            }
            if (!OcclusionCullingWindow.s_IsVisible)
            {
                return;
            }
            bool flag = this.ShowModePopup(GUILayoutUtility.GetRect(170f, EditorGUIUtility.singleLineHeight));

            if (Event.current.type == EventType.Layout)
            {
                this.m_Warning = string.Empty;
                if (!flag)
                {
                    if (StaticOcclusionCullingVisualization.previewOcclucionCamera == null)
                    {
                        this.m_Warning = "No camera selected for occlusion preview.";
                    }
                    else if (!StaticOcclusionCullingVisualization.isPreviewOcclusionCullingCameraInPVS)
                    {
                        this.m_Warning = "Camera is not inside an Occlusion View Area.";
                    }
                }
            }
            int num = 12;

            if (!string.IsNullOrEmpty(this.m_Warning))
            {
                Rect rect = GUILayoutUtility.GetRect(100f, (float)(num + 19));
                rect.x     += EditorGUI.indent;
                rect.width -= EditorGUI.indent;
                GUI.Label(rect, this.m_Warning, EditorStyles.helpBox);
            }
            else
            {
                Rect rect2 = GUILayoutUtility.GetRect(200f, (float)num);
                rect2.x     += EditorGUI.indent;
                rect2.width -= EditorGUI.indent;
                Rect position = new Rect(rect2.x, rect2.y, rect2.width, rect2.height);
                if (flag)
                {
                    EditorGUI.DrawLegend(position, Color.white, "View Volumes", StaticOcclusionCullingVisualization.showViewVolumes);
                }
                else
                {
                    EditorGUI.DrawLegend(position, Color.white, "Camera Volumes", StaticOcclusionCullingVisualization.showViewVolumes);
                }
                bool flag2 = GUI.Toggle(position, StaticOcclusionCullingVisualization.showViewVolumes, string.Empty, GUIStyle.none);
                if (flag2 != StaticOcclusionCullingVisualization.showViewVolumes)
                {
                    StaticOcclusionCullingVisualization.showViewVolumes = flag2;
                    SceneView.RepaintAll();
                }
                if (!flag)
                {
                    rect2        = GUILayoutUtility.GetRect(100f, (float)num);
                    rect2.x     += EditorGUI.indent;
                    rect2.width -= EditorGUI.indent;
                    position     = new Rect(rect2.x, rect2.y, rect2.width, rect2.height);
                    EditorGUI.DrawLegend(position, Color.green, "Visibility Lines", StaticOcclusionCullingVisualization.showVisibilityLines);
                    flag2 = GUI.Toggle(position, StaticOcclusionCullingVisualization.showVisibilityLines, string.Empty, GUIStyle.none);
                    if (flag2 != StaticOcclusionCullingVisualization.showVisibilityLines)
                    {
                        StaticOcclusionCullingVisualization.showVisibilityLines = flag2;
                        SceneView.RepaintAll();
                    }
                    rect2        = GUILayoutUtility.GetRect(100f, (float)num);
                    rect2.x     += EditorGUI.indent;
                    rect2.width -= EditorGUI.indent;
                    position     = new Rect(rect2.x, rect2.y, rect2.width, rect2.height);
                    EditorGUI.DrawLegend(position, Color.grey, "Portals", StaticOcclusionCullingVisualization.showPortals);
                    flag2 = GUI.Toggle(position, StaticOcclusionCullingVisualization.showPortals, string.Empty, GUIStyle.none);
                    if (flag2 != StaticOcclusionCullingVisualization.showPortals)
                    {
                        StaticOcclusionCullingVisualization.showPortals = flag2;
                        SceneView.RepaintAll();
                    }
                }
                if (!flag)
                {
                    flag2 = GUILayout.Toggle(StaticOcclusionCullingVisualization.showGeometryCulling, "Occlusion culling", new GUILayoutOption[0]);
                    if (flag2 != StaticOcclusionCullingVisualization.showGeometryCulling)
                    {
                        StaticOcclusionCullingVisualization.showGeometryCulling = flag2;
                        SceneView.RepaintAll();
                    }
                }
            }
        }
 private void SaveTile()
 {
     EditorUtility.SetDirty(target);
     SceneView.RepaintAll();
 }
 static void RepaintSceneAndGameViews()
 {
     SceneView.RepaintAll();
 }
Exemplo n.º 4
0
 public override void Repaint()
 {
     SceneView.RepaintAll();
 }
Exemplo n.º 5
0
 private void OnGridSelectionChanged()
 {
     SceneView.RepaintAll();
 }
Exemplo n.º 6
0
        private void DrawToolbar()
        {
            if (!canEditInScene)
            {
                EditorGUILayout.HelpBox(Styles.disabledEditMessage, MessageType.Info);
            }

            EditorGUILayout.BeginVertical("GroupBox");
            GUILayout.Label(Styles.sceneTools);

            EditorGUI.BeginDisabled(!canEditInScene);
            EditorGUILayout.Space();
            GUILayout.BeginHorizontal();
            GUILayout.FlexibleSpace();
            EditMode.DoInspectorToolbar(Styles.sceneViewEditModes, Styles.toolContents, GetBounds, this);
            GUILayout.FlexibleSpace();
            GUILayout.EndHorizontal();

            // Tools box
            GUILayout.BeginVertical(EditorStyles.helpBox);
            string helpText = Styles.baseSceneEditingToolText;

            if (sceneViewEditing)
            {
                int index = ArrayUtility.IndexOf(Styles.sceneViewEditModes, EditMode.editMode);
                if (index >= 0)
                {
                    helpText = Styles.ToolNames[index].text;
                }
            }

            GUILayout.Label(helpText, Styles.richTextMiniLabel);
            GUILayout.EndVertical();

            // Editing mode toolbar
            if (sceneViewEditing)
            {
                switch (EditMode.editMode)
                {
                case EditMode.SceneViewEditMode.LineRendererEdit:
                    DrawEditPointTools();
                    break;

                case EditMode.SceneViewEditMode.LineRendererCreate:
                    CreatePointTools();
                    break;
                }
            }
            if (!sceneViewEditing)
            {
                EditorGUI.BeginChangeCheck();
                showSimplifyPreview = EditorGUILayout.Toggle(Styles.simplifyPreview, showSimplifyPreview);
                EditorGUILayout.BeginHorizontal();
                EditorGUILayout.PrefixLabel(Styles.tolerance);
                simplifyTolerance = Mathf.Max(0, EditorGUILayout.FloatField(simplifyTolerance, GUILayout.MaxWidth(35.0f)));
                if (GUILayout.Button(Styles.simplify, EditorStyles.miniButton))
                {
                    SimplifyPoints();
                }
                if (EditorGUI.EndChangeCheck())
                {
                    ResetSimplifyPreview();
                    SceneView.RepaintAll();
                }

                EditorGUILayout.EndHorizontal();
            }
            EditorGUI.EndDisabled();

            EditorGUILayout.EndVertical();
        }
Exemplo n.º 7
0
 void SetGizmoState(AInfo ainfo)
 {
     AnnotationUtility.SetGizmoEnabled(ainfo.m_ClassID, ainfo.m_ScriptClass, ainfo.m_GizmoEnabled ? 1 : 0);
     SceneView.RepaintAll();
 }
Exemplo n.º 8
0
 protected void PerformAutoMapping()
 {
     this.AutoMapping();
     this.ValidateMapping();
     SceneView.RepaintAll();
 }
Exemplo n.º 9
0
 protected void PerformBipedMapping()
 {
     this.BipedMapping();
     this.ValidateMapping();
     SceneView.RepaintAll();
 }
        public override void OnInspectorGUI()
        {
            EditorGUI.BeginChangeCheck();

            m_Editor.PullProbePositions();
            EditMode.DoEditModeInspectorModeButton(
                EditMode.SceneViewEditMode.LightProbeGroup,
                "Edit Light Probes",
                Styles.editModeButton,
                this
                );

            GUILayout.Space(3);
            EditorGUI.BeginDisabledGroup(EditMode.editMode != EditMode.SceneViewEditMode.LightProbeGroup);

            m_Editor.drawTetrahedra = EditorGUILayout.Toggle(Styles.showWireframe, m_Editor.drawTetrahedra);
            bool performDeringing = EditorGUILayout.Toggle(Styles.performDeringing, m_Editor.GetDeringProbes());

            m_Editor.SetDeringProbes(performDeringing);

            EditorGUI.BeginDisabledGroup(m_Editor.SelectedCount == 0);
            Vector3 pos         = m_Editor.SelectedCount > 0 ? m_Editor.GetSelectedPositions()[0] : Vector3.zero;
            Vector3 newPosition = EditorGUILayout.Vector3Field(Styles.selectedProbePosition, pos);

            if (newPosition != pos)
            {
                Vector3[] selectedPositions = m_Editor.GetSelectedPositions();
                Vector3   delta             = newPosition - pos;
                for (int i = 0; i < selectedPositions.Length; i++)
                {
                    m_Editor.UpdateSelectedPosition(i, selectedPositions[i] + delta);
                }
            }
            EditorGUI.EndDisabledGroup();

            GUILayout.Space(3);

            GUILayout.BeginHorizontal();
            GUILayout.BeginVertical();

            if (GUILayout.Button(Styles.addProbe))
            {
                var position = Vector3.zero;
                if (SceneView.lastActiveSceneView)
                {
                    var probeGroup = target as LightProbeGroup;
                    if (probeGroup)
                    {
                        position = probeGroup.transform.InverseTransformPoint(position);
                    }
                }
                StartEditProbes();
                m_Editor.DeselectProbes();
                m_Editor.AddProbe(position);
            }

            if (GUILayout.Button(Styles.deleteSelected))
            {
                StartEditProbes();
                m_Editor.RemoveSelectedProbes();
            }
            GUILayout.EndVertical();
            GUILayout.BeginVertical();

            if (GUILayout.Button(Styles.selectAll))
            {
                StartEditProbes();
                m_Editor.SelectAllProbes();
            }

            if (GUILayout.Button(Styles.duplicateSelected))
            {
                StartEditProbes();
                m_Editor.DuplicateSelectedProbes();
            }

            GUILayout.EndVertical();
            GUILayout.EndHorizontal();
            EditorGUI.EndDisabledGroup();

            m_Editor.HandleEditMenuHotKeyCommands();
            m_Editor.PushProbePositions();

            if (EditorGUI.EndChangeCheck())
            {
                m_Editor.MarkTetrahedraDirty();
                SceneView.RepaintAll();
            }
        }
Exemplo n.º 11
0
 public override void OnInspectorGUI()
 {
     if (Event.current.type == EventType.ValidateCommand && Event.current.commandName == "UndoRedoPerformed")
     {
         AvatarSetupTool.TransferPoseToDescription(base.serializedObject, base.root);
         for (int i = 0; i < this.m_Bones.Length; i++)
         {
             this.m_Bones[i].Serialize(base.serializedObject);
         }
     }
     this.UpdateSelectedBone();
     if (AvatarMappingEditor.s_KeyboardControl != 0)
     {
         GUIUtility.keyboardControl            = AvatarMappingEditor.s_KeyboardControl;
         AvatarMappingEditor.s_KeyboardControl = 0;
     }
     GUILayout.BeginVertical(new GUILayoutOption[0]);
     EditorGUI.BeginChangeCheck();
     GUILayout.BeginVertical("", "TE NodeBackground", new GUILayoutOption[0]);
     this.m_BodyView = AvatarControl.ShowBoneMapping(this.m_BodyView, new AvatarControl.BodyPartFeedback(this.IsValidBodyPart), this.m_Bones, base.serializedObject, this);
     this.HandleBodyView(this.m_BodyView);
     GUILayout.EndVertical();
     this.m_FoldoutScroll = GUILayout.BeginScrollView(this.m_FoldoutScroll, AvatarMappingEditor.styles.box, new GUILayoutOption[]
     {
         GUILayout.MinHeight(80f),
         GUILayout.MaxHeight(500f),
         GUILayout.ExpandHeight(true)
     });
     this.DisplayFoldout();
     GUILayout.FlexibleSpace();
     GUILayout.EndScrollView();
     if (EditorGUI.EndChangeCheck())
     {
         this.ValidateMapping();
         SceneView.RepaintAll();
     }
     this.DisplayMappingButtons();
     GUILayout.EndVertical();
     if (GUIUtility.hotControl == 0)
     {
         this.TransferPoseIfChanged();
     }
     base.ApplyRevertGUI();
     if (Selection.activeTransform != null)
     {
         if (this.m_CurrentTransformEditor != null && this.m_CurrentTransformEditor.target != Selection.activeTransform)
         {
             UnityEngine.Object.DestroyImmediate(this.m_CurrentTransformEditor);
         }
         if (this.m_CurrentTransformEditor == null)
         {
             this.m_CurrentTransformEditor = Editor.CreateEditor(Selection.activeTransform);
         }
         EditorGUILayout.Space();
         this.m_CurrentTransformEditorFoldout = EditorGUILayout.InspectorTitlebar(this.m_CurrentTransformEditorFoldout, Selection.activeTransform, true);
         if (this.m_CurrentTransformEditorFoldout && this.m_CurrentTransformEditor != null)
         {
             this.m_CurrentTransformEditor.OnInspectorGUI();
         }
     }
     else if (this.m_CurrentTransformEditor != null)
     {
         UnityEngine.Object.DestroyImmediate(this.m_CurrentTransformEditor);
         this.m_CurrentTransformEditor = null;
     }
 }
        private void MaterialListing()
        {
            ProceduralMaterial[] sortedMaterials = this.GetSortedMaterials();
            ProceduralMaterial[] array           = sortedMaterials;
            for (int i = 0; i < array.Length; i++)
            {
                ProceduralMaterial proceduralMaterial = array[i];
                if (proceduralMaterial.isProcessing)
                {
                    base.Repaint();
                    SceneView.RepaintAll();
                    GameView.RepaintAll();
                    break;
                }
            }
            int   num  = sortedMaterials.Length;
            float num2 = GUIView.current.position.width - 16f - 18f - 2f;

            if (num2 * 2f < (float)num * 60f)
            {
                num2 -= 16f;
            }
            int  num3     = Mathf.Max(1, Mathf.FloorToInt(num2 / 60f));
            int  num4     = Mathf.CeilToInt((float)num / (float)num3);
            Rect viewRect = new Rect(0f, 0f, (float)num3 * 60f, (float)num4 * 76f);
            Rect rect     = GUILayoutUtility.GetRect(viewRect.width, Mathf.Clamp(viewRect.height, 76f, 152f) + 1f);
            Rect position = new Rect(rect.x + 1f, rect.y + 1f, rect.width - 2f, rect.height - 1f);

            GUI.Box(rect, GUIContent.none, this.m_SubstanceStyles.gridBackground);
            GUI.Box(position, GUIContent.none, this.m_SubstanceStyles.background);
            this.m_ListScroll = GUI.BeginScrollView(position, this.m_ListScroll, viewRect, false, false);
            if (this.m_EditorCache == null)
            {
                this.m_EditorCache = new EditorCache(EditorFeatures.PreviewGUI);
            }
            for (int j = 0; j < sortedMaterials.Length; j++)
            {
                ProceduralMaterial proceduralMaterial2 = sortedMaterials[j];
                if (!(proceduralMaterial2 == null))
                {
                    float     x              = (float)(j % num3) * 60f;
                    float     y              = (float)(j / num3) * 76f;
                    Rect      rect2          = new Rect(x, y, 60f, 76f);
                    bool      flag           = proceduralMaterial2.name == this.m_SelectedMaterialInstanceName;
                    Event     current        = Event.current;
                    int       controlID      = GUIUtility.GetControlID(SubstanceImporterInspector.previewNoDragDropHash, FocusType.Native, rect2);
                    EventType typeForControl = current.GetTypeForControl(controlID);
                    if (typeForControl != EventType.MouseDown)
                    {
                        if (typeForControl == EventType.Repaint)
                        {
                            Rect position2 = rect2;
                            position2.y      = rect2.yMax - 16f;
                            position2.height = 16f;
                            this.m_SubstanceStyles.resultsGridLabel.Draw(position2, EditorGUIUtility.TempContent(proceduralMaterial2.name), false, false, flag, flag);
                        }
                    }
                    else if (current.button == 0)
                    {
                        if (rect2.Contains(current.mousePosition))
                        {
                            if (current.clickCount == 1)
                            {
                                this.m_SelectedMaterialInstanceName = proceduralMaterial2.name;
                                current.Use();
                            }
                            else if (current.clickCount == 2)
                            {
                                AssetDatabase.OpenAsset(proceduralMaterial2);
                                GUIUtility.ExitGUI();
                                current.Use();
                            }
                        }
                    }
                    rect2.height -= 16f;
                    EditorWrapper editorWrapper = this.m_EditorCache[proceduralMaterial2];
                    editorWrapper.OnPreviewGUI(rect2, this.m_SubstanceStyles.background);
                }
            }
            GUI.EndScrollView();
        }
Exemplo n.º 13
0
 public override void OnInspectorGUI()
 {
     if (Event.current.type == EventType.ValidateCommand && Event.current.commandName == "UndoRedoPerformed")
     {
         AvatarSetupTool.TransferPoseToDescription(this.serializedObject, this.root);
         for (int index = 0; index < this.m_Bones.Length; ++index)
         {
             this.m_Bones[index].Serialize(this.serializedObject);
         }
     }
     this.UpdateSelectedBone();
     if (Event.current.type == EventType.KeyDown && (Event.current.keyCode == KeyCode.Backspace || Event.current.keyCode == KeyCode.Delete) && (AvatarMappingEditor.s_SelectedBoneIndex != -1 && AvatarMappingEditor.s_SelectedBoneIndex < this.m_Bones.Length))
     {
         Undo.RegisterCompleteObjectUndo((UnityEngine.Object) this, "Avatar mapping modified");
         AvatarSetupTool.BoneWrapper bone = this.m_Bones[AvatarMappingEditor.s_SelectedBoneIndex];
         bone.bone  = (Transform)null;
         bone.state = BoneState.None;
         bone.Serialize(this.serializedObject);
         Selection.activeTransform = (Transform)null;
         GUI.changed = true;
         Event.current.Use();
     }
     GUILayout.BeginVertical();
     EditorGUI.BeginChangeCheck();
     GUILayout.BeginVertical(string.Empty, (GUIStyle)"TE NodeBackground", new GUILayoutOption[0]);
     this.m_BodyView = AvatarControl.ShowBoneMapping(this.m_BodyView, new AvatarControl.BodyPartFeedback(this.IsValidBodyPart), this.m_Bones, this.serializedObject, this);
     this.HandleBodyView(this.m_BodyView);
     GUILayout.EndVertical();
     this.m_FoldoutScroll = GUILayout.BeginScrollView(this.m_FoldoutScroll, AvatarMappingEditor.styles.box, GUILayout.MinHeight(80f), GUILayout.MaxHeight(500f), GUILayout.ExpandHeight(true));
     this.DisplayFoldout();
     GUILayout.FlexibleSpace();
     GUILayout.EndScrollView();
     if (EditorGUI.EndChangeCheck())
     {
         this.ValidateMapping();
         SceneView.RepaintAll();
     }
     this.DisplayMappingButtons();
     GUILayout.EndVertical();
     if (GUIUtility.hotControl == 0)
     {
         this.TransferPoseIfChanged();
     }
     this.ApplyRevertGUI();
     if ((UnityEngine.Object)Selection.activeTransform != (UnityEngine.Object)null)
     {
         if ((UnityEngine.Object) this.m_CurrentTransformEditor != (UnityEngine.Object)null && this.m_CurrentTransformEditor.target != (UnityEngine.Object)Selection.activeTransform)
         {
             UnityEngine.Object.DestroyImmediate((UnityEngine.Object) this.m_CurrentTransformEditor);
         }
         if ((UnityEngine.Object) this.m_CurrentTransformEditor == (UnityEngine.Object)null)
         {
             this.m_CurrentTransformEditor = Editor.CreateEditor((UnityEngine.Object)Selection.activeTransform);
         }
         EditorGUILayout.Space();
         this.m_CurrentTransformEditorFoldout = EditorGUILayout.InspectorTitlebar(this.m_CurrentTransformEditorFoldout, (UnityEngine.Object)Selection.activeTransform, true);
         if (!this.m_CurrentTransformEditorFoldout || !((UnityEngine.Object) this.m_CurrentTransformEditor != (UnityEngine.Object)null))
         {
             return;
         }
         this.m_CurrentTransformEditor.OnInspectorGUI();
     }
     else
     {
         if (!((UnityEngine.Object) this.m_CurrentTransformEditor != (UnityEngine.Object)null))
         {
             return;
         }
         UnityEngine.Object.DestroyImmediate((UnityEngine.Object) this.m_CurrentTransformEditor);
         this.m_CurrentTransformEditor = (Editor)null;
     }
 }
 void SetGizmoState(AInfo ainfo, bool addToMostRecentChanged = true)
 {
     AnnotationUtility.SetGizmoEnabled(ainfo.m_ClassID, ainfo.m_ScriptClass, ainfo.m_GizmoEnabled ? 1 : 0, addToMostRecentChanged);
     SceneView.RepaintAll();
 }
Exemplo n.º 15
0
        private void CommandBufferGUI()
        {
            // Command buffers are not serialized data, so can't get to them through
            // serialized property (hence no multi-edit).
            if (targets.Length != 1)
            {
                return;
            }
            var cam = target as Camera;

            if (cam == null)
            {
                return;
            }
            int count = cam.commandBufferCount;

            if (count == 0)
            {
                return;
            }

            m_CommandBuffersShown = GUILayout.Toggle(m_CommandBuffersShown, GUIContent.Temp(count + " command buffers"), EditorStyles.foldout);
            if (!m_CommandBuffersShown)
            {
                return;
            }
            EditorGUI.indentLevel++;
            foreach (CameraEvent ce in (CameraEvent[])System.Enum.GetValues(typeof(CameraEvent)))
            {
                CommandBuffer[] cbs = cam.GetCommandBuffers(ce);
                foreach (CommandBuffer cb in cbs)
                {
                    using (new GUILayout.HorizontalScope())
                    {
                        // row with event & command buffer information label
                        Rect rowRect = GUILayoutUtility.GetRect(GUIContent.none, EditorStyles.miniLabel);
                        rowRect.xMin += EditorGUI.indent;
                        Rect minusRect = GetRemoveButtonRect(rowRect);
                        rowRect.xMax = minusRect.x;
                        GUI.Label(rowRect, string.Format("{0}: {1} ({2})", ce, cb.name, EditorUtility.FormatBytes(cb.sizeInBytes)), EditorStyles.miniLabel);
                        // and a button to remove it
                        if (GUI.Button(minusRect, Styles.iconRemove, Styles.invisibleButton))
                        {
                            cam.RemoveCommandBuffer(ce, cb);
                            SceneView.RepaintAll();
                            GameView.RepaintAll();
                            GUIUtility.ExitGUI();
                        }
                    }
                }
            }
            // "remove all" button
            using (new GUILayout.HorizontalScope())
            {
                GUILayout.FlexibleSpace();
                if (GUILayout.Button("Remove all", EditorStyles.miniButton))
                {
                    cam.RemoveAllCommandBuffers();
                    SceneView.RepaintAll();
                    GameView.RepaintAll();
                }
            }
            EditorGUI.indentLevel--;
        }
Exemplo n.º 16
0
 static internal void RepaintSceneAndGameViews()
 {
     SceneView.RepaintAll();
     PlayModeView.RepaintAll();
 }
        private void OnClipboardGUI(Rect position)
        {
            if (Event.current.type != EventType.Layout && position.Contains(Event.current.mousePosition) && GridPaintingState.activeGrid != clipboardView)
            {
                GridPaintingState.activeGrid = clipboardView;
                SceneView.RepaintAll();
            }

            // Validate palette (case 1017965)
            GUIContent paletteError = null;

            if (palette == null)
            {
                if (GridPalettes.palettes.Count == 0)
                {
                    paletteError = Styles.emptyProjectInfo;
                }
                else
                {
                    paletteError = Styles.invalidPaletteInfo;
                }
            }
            else if (palette.GetComponent <Grid>() == null)
            {
                paletteError = Styles.invalidGridInfo;
            }

            if (paletteError != null)
            {
                Color old = GUI.color;
                GUI.color = Color.gray;
                GUI.Label(new Rect(position.center.x - GUI.skin.label.CalcSize(paletteError).x * .5f, position.center.y, 500, 100), paletteError);
                GUI.color = old;
                return;
            }

            bool oldEnabled = GUI.enabled;

            GUI.enabled = !clipboardView.showNewEmptyClipboardInfo || DragAndDrop.objectReferences.Length > 0;

            if (Event.current.type == EventType.Repaint)
            {
                clipboardView.guiRect = position;
            }

            EditorGUI.BeginChangeCheck();
            clipboardView.OnGUI();
            if (EditorGUI.EndChangeCheck())
            {
                Repaint();
            }

            GUI.enabled = oldEnabled;

            if (clipboardView.showNewEmptyClipboardInfo)
            {
                Color old = GUI.color;
                GUI.color = Color.gray;
                Rect rect = new Rect(position.center.x - GUI.skin.label.CalcSize(Styles.emptyPaletteInfo).x * .5f, position.center.y, 500, 100);
                GUI.Label(rect, Styles.emptyPaletteInfo);
                GUI.color = old;
            }
        }
Exemplo n.º 18
0
 void PositionsViewSelectionChanged(List <int> selected)
 {
     m_PointEditor.m_Selection = selected;
     SceneView.RepaintAll();
 }