///////////////////////////////////////// public static void DrawGUI() { E.Load(); ScopeChange.Begin(); E.i.Enable = HEditorGUILayout.ToggleLeft(SS._Enable, E.i.Enable); EditorGUI.indentLevel++; GUILayout.Space(8f); using (new EditorGUI.DisabledGroupScope(!E.i.Enable)) { E.i.multiSceneExec = HEditorGUILayout.ToggleLeft(S._Executeevenwithmultiplesceneviews, E.i.multiSceneExec); E.i.enableTimeScaleSlider = HEditorGUILayout.ToggleLeft(S._TimeScaleSlider, E.i.enableTimeScaleSlider); E.i.syncScene2Game = HEditorGUILayout.ToggleLeft(S._Syncscenecameratogamecamera, E.i.syncScene2Game); E.i.toggleOrthographic = HEditorGUILayout.ToggleLeft(S._ToggleOrthographic, E.i.toggleOrthographic); E.i.uiBkColor = EditorGUILayout.ColorField(SS._BackColor, E.i.uiBkColor); E.i.textColor = EditorGUILayout.ColorField(SS._TextColor, E.i.textColor); GUILayout.Space(8f); ///////////////////////// HEditorGUILayout.HeaderTitle($"* {SS._Experimental}"); E.i.tools = HEditorGUILayout.ToggleLeft("Tool (UNITY_2019_1_OR_NEWER)", E.i.tools); E.i.drawPivotBox = HEditorGUILayout.ToggleLeft("Draw Pivot Box", E.i.drawPivotBox); EditorGUI.indentLevel++; ScopeDisable.Begin(!E.i.drawPivotBox); E.i.drawPivotLabel = HEditorGUILayout.ToggleLeft("Label", E.i.drawPivotLabel); ScopeDisable.End(); EditorGUI.indentLevel--; E.i.raycastPivot = HEditorGUILayout.ToggleLeft("RayCast Pivot (Alt)", E.i.raycastPivot); E.i.resetPivotSize = HEditorGUILayout.ToggleLeft("Reset Pivot Size (G)", E.i.resetPivotSize); E.i.disableSelection = HEditorGUILayout.ToggleLeft("Disable Selection (Space)", E.i.disableSelection); E.i.mouseDrag = HEditorGUILayout.ToggleLeft("Hide the mouse when dragging (UNITY_EDITOR_WIN)", E.i.mouseDrag); E.i.crossLine = HEditorGUILayout.ToggleLeft("Draw the axis from the origin", E.i.crossLine); GUILayout.Space(8f); ///////////////////////// HEditorGUILayout.HeaderTitle($"* Obsolete"); E.i.wsadMove = HEditorGUILayout.ToggleLeft("Pivot Move (W,A,S,D,Q,E)", E.i.wsadMove); GUILayout.Space(8f); } EditorGUI.indentLevel--; //} if (ScopeChange.End()) { SceneViewTools.InitDragMouse(); E.Save(); SceneViewUtils.Repaint(); } }
static void _TMPro_TMP_Text() { //if( EditorHelper.HasMenuItem( FONT_ASSET_CREATOR ) ) { if (tico == null) { tico = UnityTypes.TMPro_TextMeshProUGUI.GetIcon(); } if (SceneViewTools.ShowSideButton(FONT_ASSET_CREATOR.FileNameWithoutExtension(), tico)) { EditorApplication.ExecuteMenuItem(FONT_ASSET_CREATOR); } //} }
static void _ReflectionProbe() { if (SceneViewTools.ShowSideButton("Bake", EditorIcon.icons_processed_unityengine_reflectionprobe_icon_asset)) { foreach (var p in SelectionHierarchy.current.GetComponents <ReflectionProbe>()) { UnityEditorLightmapping.BakeReflectionProbeSnapshot(p); } } if (SceneViewTools.ShowSideButton("Bake All Reflection Probes", EditorIcon.icons_processed_unityengine_reflectionprobe_icon_asset)) { UnityEditorLightmapping.BakeAllReflectionProbesSnapshots(); } }
static void _Light() { SceneViewTools.ShowWindowButton(UnityTypes.UnityEditor_LightingWindow, "Lighting", EditorIcon.lighting); SceneViewTools.ShowWindowButton(UnityTypes.UnityEditor_LightingExplorerWindow, "Light Explorer", EditorIcon.lighting); if (Lightmapping.isRunning) { if (SceneViewTools.ShowSideButton("Cancel", EditorIcon.lighting)) { Lightmapping.Cancel(); } } else { if (SceneViewTools.ShowSideButton("Generate Lighting", EditorIcon.lighting)) { Lightmapping.ClearLightingDataAsset(); Lightmapping.Clear(); Lightmapping.BakeAsync(); } } }
static void _Animator() { SceneViewTools.ShowWindowButton(UnityTypes.UnityEditor_Graphs_AnimatorControllerTool, "Animator", EditorIcon.unityeditor_graphs_animatorcontrollertool); SceneViewTools.ShowWindowButton(UnityTypes.UnityEditor_AnimationWindow, "Animation", EditorIcon.unityeditor_animationwindow); }