refactor the runtime code

重构了运行时代码,支持全新的文件系统。
This commit is contained in:
何冠峰
2024-07-04 20:36:26 +08:00
parent 2987d356b6
commit ff02da5c54
313 changed files with 9889 additions and 7234 deletions
@@ -24,16 +24,21 @@ namespace YooAsset
if (_steps == ESteps.CheckBundle)
{
if (IsWaitForAsyncComplete)
{
OwnerBundle.WaitForAsyncComplete();
}
FileLoader.WaitForAsyncComplete();
if (OwnerBundle.IsDone() == false)
if (FileLoader.IsDone() == false)
return;
if (OwnerBundle.Status != BundleLoaderBase.EStatus.Succeed)
if (FileLoader.Status != BundleFileLoader.EStatus.Succeed)
{
string error = OwnerBundle.LastError;
string error = FileLoader.LastError;
InvokeCompletion(error, EOperationStatus.Failed);
return;
}
if (FileLoader.Result is string == false)
{
string error = "Try load AssetBundle file using load raw file method !";
InvokeCompletion(error, EOperationStatus.Failed);
return;
}
@@ -44,7 +49,7 @@ namespace YooAsset
// 2. 检测加载结果
if (_steps == ESteps.Checking)
{
RawFilePath = OwnerBundle.FileLoadPath;
RawFilePath = FileLoader.Result as string;
InvokeCompletion(string.Empty, EOperationStatus.Succeed);
}
}