public override void OnReleased()
 {
     base.OnReleased();
     TypeUtil.ClearTypeCache();
     ShaderUtil.ClearShaderCache();
     CustomPrefabs.Revert();
 }
예제 #2
0
 void ExceptionHandler(Exception ex)
 {
     Debug.LogException(ex);
     state = new SceneExplorerState();
     UpdateObjectsList();
     TypeUtil.ClearTypeCache();
 }
 void ExceptionHandler(Exception ex)
 {
     Debug.LogException(ex);
     state      = new SceneExplorerState();
     sceneRoots = GameObjectUtil.FindSceneRoots();
     TypeUtil.ClearTypeCache();
 }
예제 #4
0
 private void ClearExpanded()
 {
     state.expandedGameObjects.Clear();
     state.expandedComponents.Clear();
     state.expandedObjects.Clear();
     state.evaluatedProperties.Clear();
     state.selectedArrayStartIndices.Clear();
     state.selectedArrayEndIndices.Clear();
     searchDisplayString     = "";
     sceneTreeScrollPosition = Vector2.zero;
     state.currentRefChain   = null;
     TypeUtil.ClearTypeCache();
 }
 public override void OnCreated(ILoading loading)
 {
     base.OnCreated(loading);
     TypeUtil.ClearTypeCache();
     ShaderUtil.ClearShaderCache();
 }
예제 #6
0
        public void DrawExpandedHeader()
        {
            GUILayout.BeginHorizontal();

            GUI.contentColor = Color.green;
            GUILayout.Label("Show:", GUILayout.ExpandWidth(false));
            GUI.contentColor = Color.white;

            GUILayout.Label("Fields");
            var showFields = GUILayout.Toggle(ModTools.Instance.config.sceneExplorerShowFields, "");

            if (ModTools.Instance.config.sceneExplorerShowFields != showFields)
            {
                ModTools.Instance.config.sceneExplorerShowFields = showFields;
                ModTools.Instance.SaveConfig();
            }

            GUILayout.Label("Properties");
            var showProperties = GUILayout.Toggle(ModTools.Instance.config.sceneExplorerShowProperties, "");

            if (ModTools.Instance.config.sceneExplorerShowProperties != showProperties)
            {
                ModTools.Instance.config.sceneExplorerShowProperties = showProperties;
                ModTools.Instance.SaveConfig();
            }

            GUILayout.Label("Methods");
            var showMethods = GUILayout.Toggle(ModTools.Instance.config.sceneExplorerShowMethods, "");

            if (ModTools.Instance.config.sceneExplorerShowMethods != showMethods)
            {
                ModTools.Instance.config.sceneExplorerShowMethods = showMethods;
                ModTools.Instance.SaveConfig();
            }

            GUILayout.FlexibleSpace();

            GUILayout.EndHorizontal();

            GUILayout.BeginHorizontal();
            if (GUILayout.Button("Configure font & colors", GUILayout.ExpandWidth(false)))
            {
                ModTools.Instance.sceneExplorerColorConfig.visible       = true;
                ModTools.Instance.sceneExplorerColorConfig.rect.position = rect.position + new Vector2(32.0f, 32.0f);
            }

            GUILayout.FlexibleSpace();
            GUILayout.EndHorizontal();

            GUILayout.BeginHorizontal();
            GUI.contentColor = Color.green;
            GUILayout.Label("Show field/ property modifiers:", GUILayout.ExpandWidth(false));
            var showModifiers = GUILayout.Toggle(ModTools.Instance.config.sceneExplorerShowModifiers, "");

            if (showModifiers != ModTools.Instance.config.sceneExplorerShowModifiers)
            {
                ModTools.Instance.config.sceneExplorerShowModifiers = showModifiers;
                ModTools.Instance.SaveConfig();
            }

            GUI.contentColor = Color.white;
            GUILayout.FlexibleSpace();
            GUILayout.EndHorizontal();

            GUILayout.BeginHorizontal();
            GUI.contentColor = Color.green;
            GUILayout.Label("Show inherited members:", GUILayout.ExpandWidth(false));
            var showInheritedMembers = GUILayout.Toggle(ModTools.Instance.config.sceneExplorerShowInheritedMembers, "");

            if (showInheritedMembers != ModTools.Instance.config.sceneExplorerShowInheritedMembers)
            {
                ModTools.Instance.config.sceneExplorerShowInheritedMembers = showInheritedMembers;
                ModTools.Instance.SaveConfig();
                TypeUtil.ClearTypeCache();
            }

            GUI.contentColor = Color.white;
            GUILayout.FlexibleSpace();
            GUILayout.EndHorizontal();

            GUILayout.BeginHorizontal();
            GUI.contentColor = Color.green;
            GUILayout.Label("Evaluate properties automatically:", GUILayout.ExpandWidth(false));
            var evaluatePropertiesAutomatically = GUILayout.Toggle(ModTools.Instance.config.sceneExplorerEvaluatePropertiesAutomatically, "");

            if (evaluatePropertiesAutomatically != ModTools.Instance.config.sceneExplorerEvaluatePropertiesAutomatically)
            {
                ModTools.Instance.config.sceneExplorerEvaluatePropertiesAutomatically = evaluatePropertiesAutomatically;
                ModTools.Instance.SaveConfig();
            }

            GUI.contentColor = Color.white;
            GUILayout.FlexibleSpace();
            GUILayout.EndHorizontal();

            GUILayout.BeginHorizontal();
            GUI.contentColor = Color.green;
            GUILayout.Label("Sort alphabetically:", GUILayout.ExpandWidth(false));
            GUI.contentColor = Color.white;
            var sortAlphabetically = GUILayout.Toggle(ModTools.Instance.config.sceneExplorerSortAlphabetically, "");

            if (sortAlphabetically != ModTools.Instance.config.sceneExplorerSortAlphabetically)
            {
                ModTools.Instance.config.sceneExplorerSortAlphabetically = sortAlphabetically;
                ModTools.Instance.SaveConfig();
            }
            GUILayout.FlexibleSpace();
            GUILayout.EndHorizontal();

            DrawFindGameObjectPanel();

            GUILayout.BeginHorizontal();

            if (GUILayout.Button("▲", GUILayout.ExpandWidth(false)))
            {
                headerExpanded = false;
                RecalculateAreas();
            }

            if (GUILayout.Button("Refresh", GUILayout.ExpandWidth(false)))
            {
                Refresh();
            }

            if (GUILayout.Button("Fold all/ Clear", GUILayout.ExpandWidth(false)))
            {
                ClearExpanded();
                Refresh();
            }

            GUILayout.FlexibleSpace();
            GUILayout.EndHorizontal();
        }
예제 #7
0
 public void Refresh()
 {
     UpdateObjectsList();
     TypeUtil.ClearTypeCache();
 }
 public void Refresh()
 {
     sceneRoots = GameObjectUtil.FindSceneRoots();
     TypeUtil.ClearTypeCache();
 }