|
|
@@ -65,27 +65,7 @@ namespace GFGEditor
|
|
|
}
|
|
|
|
|
|
#endif
|
|
|
- [MenuItem("策划/更新并导入所有", false, (int)TOOL_MENU_PRIORITY.UpdateAndImportAll)]
|
|
|
- static void UpdateAndImportAll()
|
|
|
- {
|
|
|
- UpdateProject();
|
|
|
- UpdateAndImportArtRes();
|
|
|
- UpdateAndImportExcel();
|
|
|
- if (CommitWhenRelease)
|
|
|
- {
|
|
|
- CommitProject();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- [MenuItem("策划/更新并导入Excel", false, (int)TOOL_MENU_PRIORITY.UpdateAndImportExcel)]
|
|
|
- static void UpdateAndImportExcelAndCommit()
|
|
|
- {
|
|
|
- UpdateAndImportExcel();
|
|
|
- if (CommitWhenRelease)
|
|
|
- {
|
|
|
- CommitProject();
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
[MenuItem("策划/更新并导入美术资源", false, (int)TOOL_MENU_PRIORITY.UpdateAndImportArtRes)]
|
|
|
static void UpdateAndImportArtResAndCommit()
|
|
|
@@ -120,21 +100,6 @@ namespace GFGEditor
|
|
|
EditorUtility.ClearProgressBar();
|
|
|
}
|
|
|
|
|
|
- [MenuItem("策划/其它/导入配置表", false, (int)TOOL_MENU_PRIORITY.ImportExcel)]
|
|
|
- public static void ImportExcelNeiWang()
|
|
|
- {
|
|
|
- ImportExcel();
|
|
|
- }
|
|
|
-
|
|
|
- [MenuItem("策划/检查配置表", false, (int)TOOL_MENU_PRIORITY.CheckExcel)]
|
|
|
- public static void CheckExcel()
|
|
|
- {
|
|
|
- EditorUtility.DisplayProgressBar("进度", "正在检查表格", 1);
|
|
|
- //检查表格部分内容
|
|
|
- ExcelChecker.StartCheck();
|
|
|
- EditorUtility.ClearProgressBar();
|
|
|
- }
|
|
|
-
|
|
|
[MenuItem("策划/其它/导入美术资源", false, (int)TOOL_MENU_PRIORITY.ImportArtRes)]
|
|
|
public static void ImportArtResNeiWang()
|
|
|
{
|
|
|
@@ -193,71 +158,14 @@ namespace GFGEditor
|
|
|
ImportArtResTool.Import();
|
|
|
EditorUtility.ClearProgressBar();
|
|
|
}
|
|
|
-
|
|
|
- public static void ImportExcel()
|
|
|
- {
|
|
|
- Log.ILog = new UnityLogger();
|
|
|
- //清除缓存
|
|
|
- if (File.Exists(ExcelConfig.excelsCacheFolderPath))
|
|
|
- {
|
|
|
- File.Delete(ExcelConfig.excelsCacheFolderPath);
|
|
|
- }
|
|
|
- ET.Options.Instance = new ET.Options();
|
|
|
- //清除缓存
|
|
|
-
|
|
|
- if (File.Exists(ExcelConfig.excelsCacheFolderPath))
|
|
|
- {
|
|
|
- File.Delete(ExcelConfig.excelsCacheFolderPath);
|
|
|
- }
|
|
|
-
|
|
|
- EditorUtility.DisplayProgressBar("进度", "正在导入表格", 1);
|
|
|
- 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();
|
|
|
- AssetDatabase.Refresh();
|
|
|
- EditorUtility.ClearProgressBar();
|
|
|
- SQLiteHelper.Instance.CloseConnection();
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
static void UpdateAndImportArtRes()
|
|
|
{
|
|
|
UpdateArtRes();
|
|
|
ImportArtRes();
|
|
|
}
|
|
|
-
|
|
|
- static void UpdateAndImportExcel()
|
|
|
- {
|
|
|
- UpdateExcel();
|
|
|
- ImportExcel();
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
[MenuItem("Tools/ImageClip/TestImportClipImage")]
|
|
|
public static void TestImportClipImage()
|
|
|
@@ -369,51 +277,7 @@ namespace GFGEditor
|
|
|
UnityEngine.Debug.Log(assembly.name);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- //[MenuItem("Tools/Build/Build Bundles Res Init")]
|
|
|
- //public static void BuildBundlesResIn()
|
|
|
- //{
|
|
|
- // BuildScript.BuildCustomBundles(new string[] { "ResIn/Font" }, "BuildSetting");
|
|
|
- //}
|
|
|
-
|
|
|
- //[MenuItem("Tools/Build/Build Bundles All")]
|
|
|
- //public static void BuildBundlesRes()
|
|
|
- //{
|
|
|
- // BuildDllHelper.BuildHotUpdateDll();
|
|
|
- // BuildScript.BuildCustomBundles(resArr, "BuildSetting");
|
|
|
- //}
|
|
|
-
|
|
|
- ////[MenuItem("XAssets/Versions/Copy To StreamingAssets")]
|
|
|
- //[MenuItem("Tools/Build/Copy To StreamingAssets", false, 1)]
|
|
|
- //public static void CopyToStreamingAssets()
|
|
|
- //{
|
|
|
- // BuildScript.CopyToStreamingAssets();
|
|
|
- //}
|
|
|
-
|
|
|
- [MenuItem("Tools/BuildTest/导入临时版本配置", false, 1)]
|
|
|
- public static void SetBundlesExcelTestDir()
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- ExcelConfig.excelsRootDirNameDressUp = "Config-demo1";
|
|
|
- ImportExcel();
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- Log.Error(e.ToString());
|
|
|
- ExcelConfig.excelsRootDirNameDressUp = "Config";
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- //[MenuItem("Tools/BuildTest/发布临时版本", false, 3)]
|
|
|
- //public static void BuildBundlesResTemp()
|
|
|
- //{
|
|
|
- // EditorUtility.DisplayProgressBar("进度", "正在发布临时版本", 1);
|
|
|
- // BuildDllHelper.BuildHotUpdateDll();
|
|
|
- // BuildScript.BuildCustomBundles(resArr, "BuildSetting1");
|
|
|
- // EditorUtility.ClearProgressBar();
|
|
|
- //}
|
|
|
-
|
|
|
+
|
|
|
[MenuItem("Tools/ClearCache")]
|
|
|
public static void ClearCache()
|
|
|
{
|