为什么只加载了一个 其他的没有加载到 有的电脑上可以全部加载到
/// <summary>
/// 加载路径下的所有资源(通常用以加载程序集)
/// </summary>
/// <param name=“location”></param>
/// <typeparam name=“T”></typeparam>
/// <returns></returns>
public async ETTask<Dictionary<string, T>> LoadAllAssets<T>(string location) where T : UnityEngine.Object
{
AllAssetsHandle allAssetsOperationHandle = YooAssets.LoadAllAssetsAsync<T>(location);
await allAssetsOperationHandle.Task;
Dictionary<string, T> dictionary = new Dictionary<string, T>();
foreach (UnityEngine.Object assetObj in allAssetsOperationHandle.AllAssetObjects)
{
T t = assetObj as T;
dictionary.Add(t.name, t);
}
allAssetsOperationHandle.Release();
return dictionary;
}