Esempio n. 1
0
        private void DrawFind()
        {
            EditorGUILayout.BeginVertical(HStyle.boxMarginLeftStyle);

            GUILayout.Box("忽略包名:(用'换行'分隔)");
            ignorePackageStr = GUILayout.TextArea(ignorePackageStr, 500, GUILayout.MinHeight(50));
            ignorePackageStr = ignorePackageStr.Trim();
            GUILayout.Space(20);


            GUILayout.Box("代码引用:(用'换行'分隔)");
            codeUsesStr = GUILayout.TextArea(codeUsesStr, 500, GUILayout.MinHeight(50));
            codeUsesStr = codeUsesStr.Trim();
            GUILayout.Space(20);

            FairyManager.Instance.ignorePackageStr = ignorePackageStr;
            FairyManager.Instance.codeUsesStr      = codeUsesStr;

            if (GUILayout.Button("查找", GUILayout.Height(50)))
            {
                Find();
            }


            if (GUILayout.Button("打开 清除没用被用的资源 窗口", GUILayout.Height(30)))
            {
                FguiClearNoUseEditorWindow.Open();
            }

            EditorGUILayout.EndVertical();
        }
        public static void Open()
        {
            if (window == null)
            {
                window         = EditorWindow.GetWindow <FguiClearNoUseEditorWindow>("清除没有被用的资源编辑器窗口");
                window.minSize = new Vector2(600, 500);
            }

            window.listView.SetList(FairyManager.Instance.nouseList, FairyManager.Instance.useList);
            window.Show();
        }
        private void OnGUI()
        {
            if (window == null)
            {
                window = this;
            }


            GUILayout.Space(20);
            fold_find = EditorGUILayout.Foldout(fold_find, "查找");
            if (fold_find)
            {
                DrawFind();
            }


            GUILayout.Space(30);
            listView.OnGUI();
            GUILayout.Space(20);
        }
Esempio n. 4
0
 public static void OpenClearNoUse()
 {
     FguiClearNoUseEditorWindow.Open();
 }