For example, if we have all the configuration files packed into one package, and we want to load and parse all the configuration files at once
IEnumerator Start()
{
AllAssetsOperationHandle handle = package.LoadAllAssetsAsync(location);
yield return handle;
foreach(var assetObj in handle.AllAssetObjects)
{
UnityEngine.TextAsset textAsset = assetObj as UnityEngine.TextAsset;
}
}
如果想要这个接口,所有对象要独立一个package
For example, if we have all the configuration files packed into one package, and we want to load and parse all the configuration files at once IEnumerator Start() { AllAssetsOperationHandle handle = package.LoadAllAssetsAsync(location);
yield return handle;
foreach(var assetObj in handle.AllAssetObjects)
{
UnityEngine.TextAsset textAsset = assetObj as UnityEngine.TextAsset; } } 如果想要这个接口,所有对象要独立一个package