From 15fbbf38737864f28e69ae655089698155c7864a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=95=E5=86=A0=E5=B3=B0?= Date: Wed, 11 Dec 2024 18:24:40 +0800 Subject: [PATCH] Update InitializeParameters.cs --- .../YooAsset/Runtime/InitializeParameters.cs | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/Assets/YooAsset/Runtime/InitializeParameters.cs b/Assets/YooAsset/Runtime/InitializeParameters.cs index 8c93cb7..6a61716 100644 --- a/Assets/YooAsset/Runtime/InitializeParameters.cs +++ b/Assets/YooAsset/Runtime/InitializeParameters.cs @@ -165,16 +165,30 @@ namespace YooAsset } /// - /// 创建默认的Web文件系统参数 + /// 创建默认的WebServer文件系统参数 /// /// 禁用Unity的网络缓存 - public static FileSystemParameters CreateDefaultWebFileSystemParameters(bool disableUnityWebCache = false) + public static FileSystemParameters CreateDefaultWebServerFileSystemParameters(bool disableUnityWebCache = false) { string fileSystemClass = typeof(DefaultWebServerFileSystem).FullName; var fileSystemParams = new FileSystemParameters(fileSystemClass, null); fileSystemParams.AddParameter(FileSystemParametersDefine.DISABLE_UNITY_WEB_CACHE, disableUnityWebCache); return fileSystemParams; } + + /// + /// 创建默认的WebRemote文件系统参数 + /// + /// 远端资源地址查询服务类 + /// 禁用Unity的网络缓存 + public static FileSystemParameters CreateDefaultWebRemoteFileSystemParameters(IRemoteServices remoteServices, bool disableUnityWebCache = false) + { + string fileSystemClass = typeof(DefaultWebServerFileSystem).FullName; + var fileSystemParams = new FileSystemParameters(fileSystemClass, null); + fileSystemParams.AddParameter(FileSystemParametersDefine.REMOTE_SERVICES, remoteServices); + fileSystemParams.AddParameter(FileSystemParametersDefine.DISABLE_UNITY_WEB_CACHE, disableUnityWebCache); + return fileSystemParams; + } } ///