【m】本地打apk集成

This commit is contained in:
2025-07-02 18:36:48 +08:00
parent 103d1c76d4
commit b6c35a6331
4 changed files with 40 additions and 14 deletions

View File

@@ -1,13 +1,26 @@
using System.Threading.Tasks;
using UnityEngine;
#if HotUpdate
using YooAsset;
#endif
namespace Stary.Evo.TableTextConversion
{
public static class ReadDumpInformation
{
public static async Task<T> Read<T>() where T : ScriptableObject, ITableData
{
#if NotUpdate
var conf = Resources.Load<T>(typeof(T).Name);
if (conf != null)
{
return conf;
}
else
{
Debug.LogError("UnityEvo:" + "配置文件:" + typeof(T).Name + "加载失败!!!");
return null;
}
#elif HotUpdate
var conf = YooAssets.LoadAssetAsync($"Config_{typeof(T).Name}");
await conf.Task;
if (conf.Status == EOperationStatus.Succeed)
@@ -19,6 +32,7 @@ namespace Stary.Evo.TableTextConversion
Debug.LogError("UnityEvo:" + "配置文件:" + typeof(T).Name + "加载失败!!!");
return null;
}
#endif
}
#if UNITY_EDITOR
@@ -26,12 +40,12 @@ namespace Stary.Evo.TableTextConversion
{
// 同步加载并直接返回结果
var conf = Resources.Load<T>(typeof(T).Name);
if (conf != null)
{
return conf;
}
Debug.LogError($"UnityEvo:配置文件同步加载失败:{typeof(T).Name}");
return null;
}