mirror of
https://github.com/tuyoogame/YooAsset.git
synced 2026-05-18 14:00:18 +00:00
36 lines
1.2 KiB
C#
36 lines
1.2 KiB
C#
|
|
namespace YooAsset
|
|
{
|
|
/// <summary>
|
|
/// 解压文件系统
|
|
/// </summary>
|
|
internal class DefaultUnpackFileSystem : DefaultCacheFileSystem
|
|
{
|
|
public DefaultUnpackFileSystem()
|
|
{
|
|
}
|
|
public override void OnCreate(string packageName, string rootDirectory)
|
|
{
|
|
base.OnCreate(packageName, rootDirectory);
|
|
|
|
// 注意:重写保存根目录和临时目录
|
|
_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;
|
|
}
|
|
}
|
|
}
|
|
} |