mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-07 16:45:10 +00:00
Update ResConfigUtil.cs
This commit is contained in:
@@ -15,11 +15,11 @@ namespace TEngine
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 计算拼接Key
|
/// 计算拼接Key
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <typeparam name="KeyType"></typeparam>
|
/// <typeparam name="TKey"></typeparam>
|
||||||
/// <typeparam name="TType"></typeparam>
|
/// <typeparam name="TValue"></typeparam>
|
||||||
/// <param name="val"></param>
|
/// <param name="val"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public delegate KeyType ConvertDictionaryKey<KeyType, TType>(TType val);
|
public delegate TKey ConvertDictionaryKey<TKey, TValue>(TValue val);
|
||||||
|
|
||||||
public class ResConfigUtil
|
public class ResConfigUtil
|
||||||
{
|
{
|
||||||
@@ -37,7 +37,7 @@ namespace TEngine
|
|||||||
TextAsset jsonStr = TResources.Load<TextAsset>(resPath);
|
TextAsset jsonStr = TResources.Load<TextAsset>(resPath);
|
||||||
if (jsonStr == null)
|
if (jsonStr == null)
|
||||||
{
|
{
|
||||||
TLogger.LogError("读取Json配置数据失败:{0}", fileName);
|
TLogger.LogError("Config {0} Read Json Error", fileName);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -57,7 +57,7 @@ namespace TEngine
|
|||||||
TextAsset jsonStr = TResources.Load<TextAsset>(resPath);
|
TextAsset jsonStr = TResources.Load<TextAsset>(resPath);
|
||||||
if (jsonStr == null)
|
if (jsonStr == null)
|
||||||
{
|
{
|
||||||
TLogger.LogError("读取Json配置数据失败:{0}", fileName);
|
TLogger.LogError("Config {0} Read Json Error", fileName);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -77,7 +77,7 @@ namespace TEngine
|
|||||||
TextAsset jsonStr = TResources.Load<TextAsset>(resPath);
|
TextAsset jsonStr = TResources.Load<TextAsset>(resPath);
|
||||||
if (jsonStr == null)
|
if (jsonStr == null)
|
||||||
{
|
{
|
||||||
TLogger.LogError("读取Json配置数据失败:{0}", fileName);
|
TLogger.LogError("Config {0} Read Json Error", fileName);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -98,7 +98,7 @@ namespace TEngine
|
|||||||
TextAsset jsonStr = TResources.Load<TextAsset>(resPath);
|
TextAsset jsonStr = TResources.Load<TextAsset>(resPath);
|
||||||
if (jsonStr == null)
|
if (jsonStr == null)
|
||||||
{
|
{
|
||||||
TLogger.LogError("读取Json配置数据失败:{0}", fileName);
|
TLogger.LogError("Config {0} Read Json Error", fileName);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -127,6 +127,8 @@ namespace TEngine
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
etr.Dispose();
|
||||||
|
|
||||||
return jsonData;
|
return jsonData;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -141,7 +143,7 @@ namespace TEngine
|
|||||||
TextAsset jsonStr = TResources.Load<TextAsset>(resPath);
|
TextAsset jsonStr = TResources.Load<TextAsset>(resPath);
|
||||||
if (jsonStr == null)
|
if (jsonStr == null)
|
||||||
{
|
{
|
||||||
TLogger.LogError("读取Json配置数据失败:{0}", fileName);
|
TLogger.LogError("Config {0} Read Json Error", fileName);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -168,6 +170,7 @@ namespace TEngine
|
|||||||
}
|
}
|
||||||
listItem.Add(data);
|
listItem.Add(data);
|
||||||
}
|
}
|
||||||
|
etr.Dispose();
|
||||||
|
|
||||||
return jsonData;
|
return jsonData;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user