From a5c17576be0f645d1a590bcbdc113c756a2a5e24 Mon Sep 17 00:00:00 2001 From: ALEXTANG <574809918@qq.com> Date: Tue, 19 Jul 2022 17:11:27 +0800 Subject: [PATCH] Update ResConfigUtil.cs --- .../TEngine/Runtime/Config/ResConfigUtil.cs | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/Assets/TEngine/Runtime/Config/ResConfigUtil.cs b/Assets/TEngine/Runtime/Config/ResConfigUtil.cs index 6152e00a..8251d5b2 100644 --- a/Assets/TEngine/Runtime/Config/ResConfigUtil.cs +++ b/Assets/TEngine/Runtime/Config/ResConfigUtil.cs @@ -15,11 +15,11 @@ namespace TEngine /// /// 计算拼接Key /// - /// - /// + /// + /// /// /// - public delegate KeyType ConvertDictionaryKey(TType val); + public delegate TKey ConvertDictionaryKey(TValue val); public class ResConfigUtil { @@ -37,7 +37,7 @@ namespace TEngine TextAsset jsonStr = TResources.Load(resPath); if (jsonStr == null) { - TLogger.LogError("读取Json配置数据失败:{0}", fileName); + TLogger.LogError("Config {0} Read Json Error", fileName); return null; } @@ -57,7 +57,7 @@ namespace TEngine TextAsset jsonStr = TResources.Load(resPath); if (jsonStr == null) { - TLogger.LogError("读取Json配置数据失败:{0}", fileName); + TLogger.LogError("Config {0} Read Json Error", fileName); return null; } @@ -77,7 +77,7 @@ namespace TEngine TextAsset jsonStr = TResources.Load(resPath); if (jsonStr == null) { - TLogger.LogError("读取Json配置数据失败:{0}", fileName); + TLogger.LogError("Config {0} Read Json Error", fileName); return null; } @@ -98,7 +98,7 @@ namespace TEngine TextAsset jsonStr = TResources.Load(resPath); if (jsonStr == null) { - TLogger.LogError("读取Json配置数据失败:{0}", fileName); + TLogger.LogError("Config {0} Read Json Error", fileName); return null; } @@ -127,6 +127,8 @@ namespace TEngine } } + etr.Dispose(); + return jsonData; } @@ -141,7 +143,7 @@ namespace TEngine TextAsset jsonStr = TResources.Load(resPath); if (jsonStr == null) { - TLogger.LogError("读取Json配置数据失败:{0}", fileName); + TLogger.LogError("Config {0} Read Json Error", fileName); return null; } @@ -168,6 +170,7 @@ namespace TEngine } listItem.Add(data); } + etr.Dispose(); return jsonData; }