From 75881b55f630fcbfe128030b66aaa7f6f8bdcc74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=95=E5=86=A0=E5=B3=B0?= Date: Wed, 12 Nov 2025 18:41:17 +0800 Subject: [PATCH] fix #683 --- .../DefaultBuildinFileSystem.cs | 11 ++++++++++- .../Runtime/FileSystem/FileSystemParametersDefine.cs | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Assets/YooAsset/Runtime/FileSystem/DefaultBuildinFileSystem/DefaultBuildinFileSystem.cs b/Assets/YooAsset/Runtime/FileSystem/DefaultBuildinFileSystem/DefaultBuildinFileSystem.cs index 6ffa508f..c6ea39aa 100644 --- a/Assets/YooAsset/Runtime/FileSystem/DefaultBuildinFileSystem/DefaultBuildinFileSystem.cs +++ b/Assets/YooAsset/Runtime/FileSystem/DefaultBuildinFileSystem/DefaultBuildinFileSystem.cs @@ -89,6 +89,11 @@ namespace YooAsset /// public string CopyBuildinPackageManifestDestRoot { private set; get; } + /// + /// 自定义参数:解压文件系统的根目录 + /// + public string UnpackFileSystemRoot { private set; get; } + /// /// 自定义参数:解密服务接口的实例类 /// @@ -190,6 +195,10 @@ namespace YooAsset { CopyBuildinPackageManifestDestRoot = (string)value; } + else if (name == FileSystemParametersDefine.UNPACK_FILE_SYSTEM_ROOT) + { + UnpackFileSystemRoot = (string)value; + } else if (name == FileSystemParametersDefine.DECRYPTION_SERVICES) { DecryptionServices = (IDecryptionServices)value; @@ -226,7 +235,7 @@ namespace YooAsset _unpackFileSystem.SetParameter(FileSystemParametersDefine.APPEND_FILE_EXTENSION, AppendFileExtension); _unpackFileSystem.SetParameter(FileSystemParametersDefine.DECRYPTION_SERVICES, DecryptionServices); _unpackFileSystem.SetParameter(FileSystemParametersDefine.COPY_LOCAL_FILE_SERVICES, CopyLocalFileServices); - _unpackFileSystem.OnCreate(packageName, null); + _unpackFileSystem.OnCreate(packageName, UnpackFileSystemRoot); } public virtual void OnDestroy() { diff --git a/Assets/YooAsset/Runtime/FileSystem/FileSystemParametersDefine.cs b/Assets/YooAsset/Runtime/FileSystem/FileSystemParametersDefine.cs index 0f4829ab..ae85ea29 100644 --- a/Assets/YooAsset/Runtime/FileSystem/FileSystemParametersDefine.cs +++ b/Assets/YooAsset/Runtime/FileSystem/FileSystemParametersDefine.cs @@ -26,5 +26,6 @@ namespace YooAsset public const string COPY_BUILDIN_PACKAGE_MANIFEST = "COPY_BUILDIN_PACKAGE_MANIFEST"; public const string COPY_BUILDIN_PACKAGE_MANIFEST_DEST_ROOT = "COPY_BUILDIN_PACKAGE_MANIFEST_DEST_ROOT"; public const string COPY_LOCAL_FILE_SERVICES = "COPY_LOCAL_FILE_SERVICES"; + public const string UNPACK_FILE_SYSTEM_ROOT = "UNPACK_FILE_SYSTEM_ROOT"; } } \ No newline at end of file