public static void ExportAllUI() { var uiPath = Application.dataPath + "/" + KEngineDef.ResourcesEditDir + "/UI"; var uiScenes = Directory.GetFiles(uiPath, "*.unity", SearchOption.AllDirectories); foreach (string uiScene in uiScenes) { Log.Info("begin export {0}", uiScene); KUGUIBuilder.UISceneToPrefabs(); EditorSceneManager.OpenScene(uiScene); } }
public static void ExportAllUI() { if (Application.isPlaying) { Log.Error("Cannot export in playing mode! Please stop!"); return; } var uiPath = Application.dataPath + "/" + KEngineDef.ResourcesEditDir + "/UI"; var uiScenes = Directory.GetFiles(uiPath, "*.unity", SearchOption.AllDirectories); foreach (string uiScene in uiScenes) { Log.Info("begin export {0}", uiScene); EditorSceneManager.OpenScene(uiScene); KUGUIBuilder.UISceneToPrefabs(); } BuildTools.BuildAllAssetBundles(); }