mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
Init TEngine4.0.0
Init TEngine4.0.0
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
|
||||
namespace YooAsset
|
||||
{
|
||||
internal class BundledRawFileProvider : ProviderBase
|
||||
{
|
||||
public BundledRawFileProvider(AssetSystemImpl impl, string providerGUID, AssetInfo assetInfo) : base(impl, providerGUID, assetInfo)
|
||||
{
|
||||
}
|
||||
public override void Update()
|
||||
{
|
||||
DebugBeginRecording();
|
||||
|
||||
if (IsDone)
|
||||
return;
|
||||
|
||||
if (Status == EStatus.None)
|
||||
{
|
||||
Status = EStatus.CheckBundle;
|
||||
}
|
||||
|
||||
// 1. 检测资源包
|
||||
if (Status == EStatus.CheckBundle)
|
||||
{
|
||||
if (IsWaitForAsyncComplete)
|
||||
{
|
||||
OwnerBundle.WaitForAsyncComplete();
|
||||
}
|
||||
|
||||
if (OwnerBundle.IsDone() == false)
|
||||
return;
|
||||
|
||||
if (OwnerBundle.Status != BundleLoaderBase.EStatus.Succeed)
|
||||
{
|
||||
Status = EStatus.Failed;
|
||||
LastError = OwnerBundle.LastError;
|
||||
InvokeCompletion();
|
||||
return;
|
||||
}
|
||||
|
||||
Status = EStatus.Checking;
|
||||
}
|
||||
|
||||
// 2. 检测加载结果
|
||||
if (Status == EStatus.Checking)
|
||||
{
|
||||
RawFilePath = OwnerBundle.FileLoadPath;
|
||||
Status = EStatus.Succeed;
|
||||
InvokeCompletion();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user