update operation logic
This commit is contained in:
@@ -17,20 +17,5 @@ namespace YooAsset
|
||||
_saveFileRoot = PathUtility.Combine(_packageRoot, DefaultUnpackFileSystemDefine.SaveFilesFolderName);
|
||||
_tempFileRoot = PathUtility.Combine(_packageRoot, DefaultUnpackFileSystemDefine.TempFilesFolderName);
|
||||
}
|
||||
public override FSLoadBundleOperation LoadBundleFile(PackageBundle bundle)
|
||||
{
|
||||
if (RawFileBuildPipeline)
|
||||
{
|
||||
var operation = new DUFSLoadRawBundleOperation(this, bundle);
|
||||
OperationSystem.StartOperation(PackageName, operation);
|
||||
return operation;
|
||||
}
|
||||
else
|
||||
{
|
||||
var operation = new DUFSLoadAssetBundleOperation(this, bundle);
|
||||
OperationSystem.StartOperation(PackageName, operation);
|
||||
return operation;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 59b123e460757694180175970bf28826
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
-57
@@ -1,57 +0,0 @@
|
||||
|
||||
namespace YooAsset
|
||||
{
|
||||
internal class DUFSLoadAssetBundleOperation : DCFSLoadAssetBundleOperation
|
||||
{
|
||||
public DUFSLoadAssetBundleOperation(DefaultUnpackFileSystem fileSystem, PackageBundle bundle) : base(fileSystem, bundle)
|
||||
{
|
||||
}
|
||||
public override void WaitForAsyncComplete()
|
||||
{
|
||||
_isWaitForAsyncComplete = true;
|
||||
|
||||
while (true)
|
||||
{
|
||||
// 文件解压
|
||||
if (_downloadFileOp != null)
|
||||
{
|
||||
if (_downloadFileOp.IsDone == false)
|
||||
_downloadFileOp.WaitForAsyncComplete();
|
||||
}
|
||||
|
||||
// 驱动流程
|
||||
InternalOnUpdate();
|
||||
|
||||
// 完成后退出
|
||||
if (IsDone)
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal class DUFSLoadRawBundleOperation : DCFSLoadRawBundleOperation
|
||||
{
|
||||
public DUFSLoadRawBundleOperation(DefaultUnpackFileSystem fileSystem, PackageBundle bundle) : base(fileSystem, bundle)
|
||||
{
|
||||
}
|
||||
public override void WaitForAsyncComplete()
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
// 文件解压
|
||||
if (_downloadFileOp != null)
|
||||
{
|
||||
if (_downloadFileOp.IsDone == false)
|
||||
_downloadFileOp.WaitForAsyncComplete();
|
||||
}
|
||||
|
||||
// 驱动流程
|
||||
InternalOnUpdate();
|
||||
|
||||
// 完成后退出
|
||||
if (IsDone)
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
-11
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 47f6fe3a815d28e49815db7c09c1fa76
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user