mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
TEngine全面更新,升级YooAsset2.1.1、UniTask、UIWindow、I2Localization
TEngine全面更新,升级YooAsset2.1.1、UniTask、UIWindow、I2Localization
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
|
||||
namespace YooAsset
|
||||
{
|
||||
internal class BundledRawFileProvider : ProviderBase
|
||||
{
|
||||
public BundledRawFileProvider(ResourceManager manager, string providerGUID, AssetInfo assetInfo) : base(manager, providerGUID, assetInfo)
|
||||
{
|
||||
}
|
||||
internal override void InternalOnStart()
|
||||
{
|
||||
DebugBeginRecording();
|
||||
}
|
||||
internal override void InternalOnUpdate()
|
||||
{
|
||||
if (IsDone)
|
||||
return;
|
||||
|
||||
if (_steps == ESteps.None)
|
||||
{
|
||||
_steps = ESteps.CheckBundle;
|
||||
}
|
||||
|
||||
// 1. 检测资源包
|
||||
if (_steps == ESteps.CheckBundle)
|
||||
{
|
||||
if (IsWaitForAsyncComplete)
|
||||
{
|
||||
OwnerBundle.WaitForAsyncComplete();
|
||||
}
|
||||
|
||||
if (OwnerBundle.IsDone() == false)
|
||||
return;
|
||||
|
||||
if (OwnerBundle.Status != BundleLoaderBase.EStatus.Succeed)
|
||||
{
|
||||
string error = OwnerBundle.LastError;
|
||||
InvokeCompletion(error, EOperationStatus.Failed);
|
||||
return;
|
||||
}
|
||||
|
||||
_steps = ESteps.Checking;
|
||||
}
|
||||
|
||||
// 2. 检测加载结果
|
||||
if (_steps == ESteps.Checking)
|
||||
{
|
||||
RawFilePath = OwnerBundle.FileLoadPath;
|
||||
InvokeCompletion(string.Empty, EOperationStatus.Succeed);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user