private void DrawFields()
        {
            GUILayout.BeginHorizontal();
            {
                GUIHelper.FixedLabel(" Select Folder", 18, Color.yellow);

                if (GUIHelper.ColorButton("..", Color.cyan, 40, 20))
                {
                    m_folderPath = EditorUtility.OpenFolderPanel("Select Folder", Application.dataPath, "");
                    m_folderPath = "Assets" + m_folderPath.Substring(Application.dataPath.Length);
                }
            }
            GUILayout.EndHorizontal();

            GUILayout.BeginHorizontal();
            {
                m_folderPath = GUILayout.TextField(m_folderPath, GUILayout.Width(500));

                if (GUIHelper.ColorButton("Clean", Color.cyan))
                {
                    m_results.Clear();
                    CleanMaterials(m_folderPath);
                }
            }
            GUILayout.EndHorizontal();
        }
        protected override void OnWindowToolbar()
        {
            GUIHelper.FontLabel("Project: ", 18, Color.green);

            EditorGUI.BeginChangeCheck();

            m_project = EditorGUILayout.ObjectField(m_project, typeof(ProjectModel), true) as ProjectModel;

            if (m_project == null)
            {
                return;
            }

            if (EditorGUI.EndChangeCheck())
            {
                Reload();
            }

            if (GUIHelper.ColorButton("Reload", Color.cyan))
            {
                Reload();
            }

            if (!m_project.Scripts.Any())
            {
                if (GUIHelper.ColorButton("New Script", Color.cyan))
                {
                    var script = ScriptableObjectUtility.CreateAsset <ScriptModel>(m_project);
                    m_project.Scripts.Add(script);
                }

                return;
            }

            GUILayout.Space(10);
            GUI.backgroundColor = Color.yellow;
            {
                m_scriptIndex = EditorGUILayout.Popup(m_scriptIndex, m_scriptNames.ToArray(), GUILayout.Width(200), GUILayout.Height(30));
            }
            GUI.backgroundColor = Color.white;

            if (m_script == m_project.Scripts[m_scriptIndex])
            {
                return;
            }

            ReloadScript();
        }
        private void DrawResult()
        {
            foreach (var result in m_results.Values)
            {
                GUILayout.BeginHorizontal();
                {
                    var collapsed = result.IsCollapsed ? "+" : "-";
                    if (GUIHelper.ColorButton(collapsed, Color.red, 20, 20))
                    {
                        result.IsCollapsed = !result.IsCollapsed;
                    }

                    GUILayout.Label(result.Name, GUILayout.Width(200));
                    GUI.backgroundColor = Color.cyan;
                    {
                        if (GUIHelper.Button("Select", 100, 20))
                        {
                            Selection.activeObject = AssetDatabase.LoadMainAssetAtPath(result.Path);
                        }
                    }
                    GUI.backgroundColor = Color.white;
                }
                GUILayout.EndHorizontal();

                if (result.IsCollapsed)
                {
                    continue;
                }

                foreach (var property in result.Properties)
                {
                    GUILayout.Label(property);
                }

                GUIHelper.HorizontalSplitter(1, 3);
            }
        }