void ShowPath() { EditorGUILayout.Space(); EditorGUILayout.BeginHorizontal(); GUIStyle style = new GUIStyle("boldLabel"); EditorGUILayout.LabelField("Path".ToGUIContent(), style, GUILayout.Width(45)); Path = CustomEditorBase.FolderPathButton(Path, assetsPath); GUILayout.Space(5); EditorGUILayout.EndHorizontal(); Folder = EditorGUILayout.Toggle("Create Folder", Folder); string folderPath = string.Format("{0}{1}{2}", assetsPath, System.IO.Path.AltDirectorySeparatorChar, Path); if (!Directory.Exists(folderPath)) { EditorGUILayout.HelpBox("Selected directory does not exist.", MessageType.Warning); height += 44; } else if (!Folder && Directory.GetFiles(folderPath).Length > 0) { EditorGUILayout.HelpBox("Selected directory is not empty.", MessageType.Warning); height += 44; } CustomEditorBase.Separator(); }
void ShowFilters() { EditorGUI.BeginChangeCheck(); CustomEditorBase.BeginBox(); GUILayout.Space(2); EditorGUILayout.BeginHorizontal(); float labelWidth = EditorGUIUtility.labelWidth; EditorGUIUtility.labelWidth = 42; pathFilter = CustomEditorBase.FolderPathButton(pathFilter, Application.dataPath.Substring(0, Application.dataPath.Length - "Assets".Length), "Filter".ToGUIContent(), GUILayout.MinWidth(200)); EditorGUIUtility.labelWidth = labelWidth; GUILayout.Space(32); searchFilter = EditorGUILayout.TextField(searchFilter, new GUIStyle("ToolbarSeachTextField")); if (GUILayout.Button("", new GUIStyle("ToolbarSeachCancelButton"))) { EditorGUIUtility.editingTextField = false; searchFilter = ""; } EditorGUILayout.EndHorizontal(); CustomEditorBase.EndBox(); if (EditorGUI.EndChangeCheck()) { SetOrdererMaterials(); Save(); } }