TEngine 6

This commit is contained in:
Alex-Rachel
2025-03-07 23:09:46 +08:00
parent aad8ff3ee5
commit 551727687f
1988 changed files with 46223 additions and 94880 deletions

View File

@@ -0,0 +1,39 @@

namespace YooAsset
{
internal sealed class AssetProvider : ProviderOperation
{
private FSLoadAssetOperation _loadAssetOp;
public AssetProvider(ResourceManager manager, string providerGUID, AssetInfo assetInfo) : base(manager, providerGUID, assetInfo)
{
}
protected override void ProcessBundleResult()
{
if (_loadAssetOp == null)
{
_loadAssetOp = BundleResultObject.LoadAssetAsync(MainAssetInfo);
_loadAssetOp.StartOperation();
AddChildOperation(_loadAssetOp);
}
if (IsWaitForAsyncComplete)
_loadAssetOp.WaitForAsyncComplete();
_loadAssetOp.UpdateOperation();
Progress = _loadAssetOp.Progress;
if (_loadAssetOp.IsDone == false)
return;
if (_loadAssetOp.Status != EOperationStatus.Succeed)
{
InvokeCompletion(_loadAssetOp.Error, EOperationStatus.Failed);
}
else
{
AssetObject = _loadAssetOp.Result;
InvokeCompletion(string.Empty, EOperationStatus.Succeed);
}
}
}
}