Exemple #1
0
        private void OnGUI()
        {
            scrollVector2 = GUILayout.BeginScrollView(scrollVector2);

            //代码刷新 引用丢失
            if (projectManagerConfig == null)
            {
                projectManagerConfig = ProjectManagerConfigManager.Get();
            }

            //EditorGUILayout.BeginHorizontal();
            ShowOneKeyCheck();

            ShowCheckFileName();

            ShowLllegalFiles();

            //EditorGUILayout.EndHorizontal();

            //EditorGUILayout.BeginHorizontal();
            //GUILayout.Button("文件命名规范", GUILayout.MinHeight(30f));
            //EditorGUILayout.EndHorizontal();

            //EditorGUILayout.ToggleLeft("文件命名规范", true);
            //EditorGUILayout.ToggleLeft("预设文件包含空组建", true);
            //EditorGUILayout.ToggleLeft("未引用组建", true);
            //EditorGUILayout.ToggleLeft("重复资源", true);
            //EditorGUILayout.ToggleLeft("SVN冲突文件", true);

            //if (Event.current.type == EventType.MouseDown)
            //{
            //    GUI.FocusControl(null);
            //}

            //GUI.SetNextControlName("text:");
            //text = EditorGUILayout.TextField(text);
            //var rect = GUILayoutUtility.GetLastRect();
            //if (GUILayout.Button("111"))
            //{
            //    text = string.Empty;
            //}

            //if (Event.current.type == EventType.MouseDown && !rect.Contains(Event.current.mousePosition) && GUI.GetNameOfFocusedControl() == "text:")
            //{ //判断控件处于聚焦状态时

            //    GUI.FocusControl(null);
            //}
            GUILayout.EndScrollView();
        }
        public static ProjectManagerConfig Get()
        {
            if (config == null)
            {
                string path = GetAssetPath();
                config = AssetDatabase.LoadAssetAtPath <ProjectManagerConfig>(path);
            }
            if (config == null)
            {
                string path = GetNewAssetPath();//因为路径变动导致错误 重新获取新路径
                config = AssetDatabase.LoadAssetAtPath <ProjectManagerConfig>(path);
            }

            return(config);
        }
Exemple #3
0
        private static void Open()
        {
            if (me == null)
            {
                me = GetWindow <ProjectManagerWindow>();
                me.titleContent      = new GUIContent("项目管理工具");
                projectManagerConfig = ProjectManagerConfigManager.Get();

                me.minSize = projectManagerConfig.windowSize;
                me.maxSize = projectManagerConfig.windowSize;
            }
            else
            {
                me.Close();
            }
        }