|
@@ -28,7 +28,7 @@ namespace GFGEditor
|
|
|
}
|
|
|
|
|
|
#if PT_TEMP || PT_TISHEN || PT_DEV
|
|
|
-
|
|
|
+
|
|
|
#else
|
|
|
[MenuItem("策划/更新并导入所有", false, (int)TOOL_MENU_PRIORITY.UpdateAndImportAll)]
|
|
|
static void UpdateAndImportAll()
|
|
@@ -87,47 +87,9 @@ namespace GFGEditor
|
|
|
}
|
|
|
|
|
|
[MenuItem("策划/其它/导入配置表", false, (int)TOOL_MENU_PRIORITY.ImportExcel)]
|
|
|
- public static void ImportExcel()
|
|
|
+ public static void ImportExcelNeiWang()
|
|
|
{
|
|
|
- Log.ILog = new UnityLogger();
|
|
|
- ET.Options.Instance = new ET.Options();
|
|
|
- EditorUtility.DisplayProgressBar("进度", "正在导入表格", 1);
|
|
|
- SqliteController.Instance.dirPath = Path.Combine(Environment.CurrentDirectory, ResPathUtil.CONFIG_DIR_PATH);
|
|
|
- SqliteController.Instance.Init(false, null);
|
|
|
- SQLiteHelper.Instance.OpenConnection();
|
|
|
- //try
|
|
|
- //{
|
|
|
-
|
|
|
- SQLiteHelper.Instance.ClearAllTables();
|
|
|
- CodeTemplateFactory.Init();
|
|
|
-
|
|
|
- if (!Directory.Exists(ExcelConfig.configCodePath))
|
|
|
- {
|
|
|
- Directory.CreateDirectory(ExcelConfig.configCodePath);
|
|
|
- }
|
|
|
- if (!Directory.Exists(ExcelConfig.configArrayCodePath))
|
|
|
- {
|
|
|
- Directory.CreateDirectory(ExcelConfig.configArrayCodePath);
|
|
|
- }
|
|
|
-
|
|
|
- ExcelReader.WriteExcle();
|
|
|
- ExcelReader.ReadExcel(CodeBuilder.GenerateCode);
|
|
|
- //}
|
|
|
- //catch (Exception e)
|
|
|
- //{
|
|
|
- // throw (e.InnerException);
|
|
|
- //}
|
|
|
- //finally
|
|
|
- //{
|
|
|
- SQLiteHelper.Instance.CloseConnection();
|
|
|
- //}
|
|
|
- //开始扫描表格,自动生成部分数据
|
|
|
- ExcelScanner.StartScan();
|
|
|
- //拷贝slqlite文件至共享库
|
|
|
- File.Copy(ResPathUtil.SQLITE_FILE_PATH, ExcelConfig.sqliteFilePathCSShare, true);
|
|
|
- AssetDatabase.Refresh();
|
|
|
- EditorUtility.ClearProgressBar();
|
|
|
- SQLiteHelper.Instance.CloseConnection();
|
|
|
+ ImportExcel();
|
|
|
}
|
|
|
|
|
|
[MenuItem("策划/检查配置表", false, (int)TOOL_MENU_PRIORITY.CheckExcel)]
|
|
@@ -140,11 +102,9 @@ namespace GFGEditor
|
|
|
}
|
|
|
|
|
|
[MenuItem("策划/其它/导入美术资源", false, (int)TOOL_MENU_PRIORITY.ImportArtRes)]
|
|
|
- public static void ImportArtRes()
|
|
|
+ public static void ImportArtResNeiWang()
|
|
|
{
|
|
|
- EditorUtility.DisplayProgressBar("进度", "正在导入美术资源", 1);
|
|
|
- ImportArtResTool.Import();
|
|
|
- EditorUtility.ClearProgressBar();
|
|
|
+ ImportArtRes();
|
|
|
}
|
|
|
#endif
|
|
|
|
|
@@ -180,7 +140,54 @@ namespace GFGEditor
|
|
|
ProcessUtil.ExcuteBat("Assets/Editor/Bat/", "commitBundles.bat");
|
|
|
EditorUtility.ClearProgressBar();
|
|
|
}
|
|
|
+ public static void ImportArtRes()
|
|
|
+ {
|
|
|
+ EditorUtility.DisplayProgressBar("进度", "正在导入美术资源", 1);
|
|
|
+ ImportArtResTool.Import();
|
|
|
+ EditorUtility.ClearProgressBar();
|
|
|
+ }
|
|
|
+ public static void ImportExcel()
|
|
|
+ {
|
|
|
+ Log.ILog = new UnityLogger();
|
|
|
+ ET.Options.Instance = new ET.Options();
|
|
|
+ EditorUtility.DisplayProgressBar("进度", "正在导入表格", 1);
|
|
|
+ SqliteController.Instance.dirPath = Path.Combine(Environment.CurrentDirectory, ResPathUtil.CONFIG_DIR_PATH);
|
|
|
+ SqliteController.Instance.Init(false, null);
|
|
|
+ SQLiteHelper.Instance.OpenConnection();
|
|
|
+ //try
|
|
|
+ //{
|
|
|
+
|
|
|
+ SQLiteHelper.Instance.ClearAllTables();
|
|
|
+ CodeTemplateFactory.Init();
|
|
|
|
|
|
+ if (!Directory.Exists(ExcelConfig.configCodePath))
|
|
|
+ {
|
|
|
+ Directory.CreateDirectory(ExcelConfig.configCodePath);
|
|
|
+ }
|
|
|
+ if (!Directory.Exists(ExcelConfig.configArrayCodePath))
|
|
|
+ {
|
|
|
+ Directory.CreateDirectory(ExcelConfig.configArrayCodePath);
|
|
|
+ }
|
|
|
+
|
|
|
+ ExcelReader.WriteExcle();
|
|
|
+ ExcelReader.ReadExcel(CodeBuilder.GenerateCode);
|
|
|
+ //}
|
|
|
+ //catch (Exception e)
|
|
|
+ //{
|
|
|
+ // throw (e.InnerException);
|
|
|
+ //}
|
|
|
+ //finally
|
|
|
+ //{
|
|
|
+ SQLiteHelper.Instance.CloseConnection();
|
|
|
+ //}
|
|
|
+ //开始扫描表格,自动生成部分数据
|
|
|
+ ExcelScanner.StartScan();
|
|
|
+ //拷贝slqlite文件至共享库
|
|
|
+ File.Copy(ResPathUtil.SQLITE_FILE_PATH, ExcelConfig.sqliteFilePathCSShare, true);
|
|
|
+ AssetDatabase.Refresh();
|
|
|
+ EditorUtility.ClearProgressBar();
|
|
|
+ SQLiteHelper.Instance.CloseConnection();
|
|
|
+ }
|
|
|
static void UpdateAndImportArtRes()
|
|
|
{
|
|
|
UpdateArtRes();
|