private static void AddTempleteUI(EPrefabType prefabType, string prefabName) { string prefabPath = prefabType.isNestPrefab() ? EditorPath.NestUIAssetPath : EditorPath.TempleteUIAssetPath; string path = EditorPath.Combine(EditorPath.ProjectPathStart, prefabPath); string prefabWithExt = Tool.GetNameWithExtension(prefabName, EditorConst.PrefabExtension); m_dicPrefabPath.Add(prefabType, EditorPath.Combine(path, prefabWithExt)); }
public static void LoadAllPrefab(Action <GameObject> doSomething) { LoadPrefab(EditorPath.TempleteUI, doSomething); string[] windowFolders = Directory.GetDirectories(EditorPath.UI); if (windowFolders != null) { for (int index = 0; index < windowFolders.Length; index++) { string windowPrefabFolder = EditorPath.Combine(windowFolders[index], EditorPath.UIPrefabsFolder); LoadPrefab(windowPrefabFolder, doSomething); } } AssetDatabase.SaveAssets(); }