From 22f1c6cdf3ff6debe7b69d3db3199d8fd5488be9 Mon Sep 17 00:00:00 2001 From: client_Wu Xijin <364452445@qq.com> Date: 星期四, 14 二月 2019 00:06:19 +0800 Subject: [PATCH] 3335 配置表读取重构。 --- Assets/Editor/Tool/ConfigClassGenerate.cs | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Assets/Editor/Tool/ConfigClassGenerate.cs b/Assets/Editor/Tool/ConfigClassGenerate.cs index 73e6ecd..9f62d62 100644 --- a/Assets/Editor/Tool/ConfigClassGenerate.cs +++ b/Assets/Editor/Tool/ConfigClassGenerate.cs @@ -255,7 +255,6 @@ var newConfigPath = configClassPath + string.Format("/{0}Config.cs", _name); AssetDatabase.DeleteAsset(newConfigPath); UnityEngine.Object o = CreateScriptAssetFromTemplate(newConfigPath, templatePath); - AddConfigInit(newConfigPath); ProjectWindowUtil.ShowCreatedAsset(o); } @@ -287,7 +286,7 @@ internal static void AddConfigInit(string pathName) { string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(pathName); - string add1 = string.Format("{0}.Init();{1}", fileNameWithoutExtension, "\r\n\t\ttaskCount++;"); + string add1 = string.Format("{0}.Init();taskCount++;", fileNameWithoutExtension); string add2 = string.Format("completeCount += {0}.inited ? 1 : 0;", fileNameWithoutExtension); string path = Application.dataPath + "/Scripts/Utility/ConfigInitiator.cs"; @@ -297,6 +296,10 @@ { text = text.Replace("//鍒濆鍖栫粨鏉焅r\n", add1 + "\r\n" + "\t\t//鍒濆鍖栫粨鏉焅r\n"); } + else + { + Debug.Log(fileNameWithoutExtension); + } if (!text.Contains(add2)) { -- Gitblit v1.8.0