protected void OnEditModeStart(Editor editor, UnityEditorInternal.EditMode.SceneViewEditMode mode) { if ((mode == UnityEditorInternal.EditMode.SceneViewEditMode.Collider) && (editor == this)) { this.OnEditStart(); } }
private void EditModeStarted(Editor editor, UnityEditorInternal.EditMode.SceneViewEditMode mode) { if ((editor == this) && (mode == UnityEditorInternal.EditMode.SceneViewEditMode.LightProbeGroup)) { this.StartEditProbes(); } }
private void DoToolbar() { using (new EditorGUI.DisabledScope(this.m_BoundingBoxMode.intValue != 2)) { GUILayout.BeginHorizontal(new GUILayoutOption[0]); GUILayout.FlexibleSpace(); UnityEditorInternal.EditMode.SceneViewEditMode editMode = UnityEditorInternal.EditMode.editMode; EditorGUI.BeginChangeCheck(); UnityEditorInternal.EditMode.DoInspectorToolbar(Styles.sceneViewEditModes, Styles.toolContents, this.GetGlobalBounds(), this); if (EditorGUI.EndChangeCheck()) { s_LastInteractedEditor = this; } if ((editMode != UnityEditorInternal.EditMode.editMode) && (Toolbar.get != null)) { Toolbar.get.Repaint(); } GUILayout.FlexibleSpace(); GUILayout.EndHorizontal(); GUILayout.BeginVertical(EditorStyles.helpBox, new GUILayoutOption[0]); string baseSceneEditingToolText = Styles.baseSceneEditingToolText; if (this.sceneViewEditing) { int index = ArrayUtility.IndexOf <UnityEditorInternal.EditMode.SceneViewEditMode>(Styles.sceneViewEditModes, UnityEditorInternal.EditMode.editMode); if (index >= 0) { baseSceneEditingToolText = Styles.toolNames[index].text; } } GUILayout.Label(baseSceneEditingToolText, Styles.richTextMiniLabel, new GUILayoutOption[0]); GUILayout.EndVertical(); EditorGUILayout.Space(); } }
private bool IsReflectionProbeEditMode(UnityEditorInternal.EditMode.SceneViewEditMode editMode) { if (editMode != UnityEditorInternal.EditMode.SceneViewEditMode.ReflectionProbeBox) { return(editMode == UnityEditorInternal.EditMode.SceneViewEditMode.ReflectionProbeOrigin); } return(true); }
protected void OnEditModeStart(Editor editor, UnityEditorInternal.EditMode.SceneViewEditMode mode) { if (mode != UnityEditorInternal.EditMode.SceneViewEditMode.Collider || !((Object)editor == (Object)this)) { return; } this.OnEditStart(); }
private void DoToolbar() { GUILayout.BeginHorizontal(new GUILayoutOption[0]); GUILayout.FlexibleSpace(); GUI.changed = false; UnityEditorInternal.EditMode.SceneViewEditMode editMode = UnityEditorInternal.EditMode.editMode; EditorGUI.BeginChangeCheck(); UnityEditorInternal.EditMode.DoInspectorToolbar(Styles.sceneViewEditModes, Styles.toolContents, this.GetBounds(), this); if (EditorGUI.EndChangeCheck()) { s_LastInteractedEditor = this; } if (editMode != UnityEditorInternal.EditMode.editMode) { if (UnityEditorInternal.EditMode.editMode == UnityEditorInternal.EditMode.SceneViewEditMode.ReflectionProbeOrigin) { this.m_OldTransformPosition = ((ReflectionProbe)this.target).transform.position; } if (Toolbar.get != null) { Toolbar.get.Repaint(); } } GUILayout.FlexibleSpace(); GUILayout.EndHorizontal(); GUILayout.BeginVertical(EditorStyles.helpBox, new GUILayoutOption[0]); string baseSceneEditingToolText = Styles.baseSceneEditingToolText; if (this.sceneViewEditing) { int index = ArrayUtility.IndexOf <UnityEditorInternal.EditMode.SceneViewEditMode>(Styles.sceneViewEditModes, UnityEditorInternal.EditMode.editMode); if (index >= 0) { baseSceneEditingToolText = Styles.toolNames[index].text; } } GUILayout.Label(baseSceneEditingToolText, Styles.richTextMiniLabel, new GUILayoutOption[0]); GUILayout.EndVertical(); EditorGUILayout.Space(); }
private bool IsLightProbeVolumeProxyEditMode(UnityEditorInternal.EditMode.SceneViewEditMode editMode) => ((editMode == UnityEditorInternal.EditMode.SceneViewEditMode.LightProbeProxyVolumeBox) || (editMode == UnityEditorInternal.EditMode.SceneViewEditMode.LightProbeProxyVolumeOrigin));
private bool IsReflectionProbeEditMode(UnityEditorInternal.EditMode.SceneViewEditMode editMode) { return((editMode == UnityEditorInternal.EditMode.SceneViewEditMode.ReflectionProbeBox) || (editMode == UnityEditorInternal.EditMode.SceneViewEditMode.ReflectionProbeOrigin)); }