From f8036782e40d378b0ed1ba31b1e3215a6bf6a34a Mon Sep 17 00:00:00 2001 From: hevinci Date: Fri, 29 Apr 2022 16:42:53 +0800 Subject: [PATCH] BundleInfo Adds the InCloud method MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BundleInfo增加资源包文件是否在云端的查询接口 --- .../YooAsset/Runtime/PatchSystem/BundleInfo.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Assets/YooAsset/Runtime/PatchSystem/BundleInfo.cs b/Assets/YooAsset/Runtime/PatchSystem/BundleInfo.cs index 8b5360b..82de44c 100644 --- a/Assets/YooAsset/Runtime/PatchSystem/BundleInfo.cs +++ b/Assets/YooAsset/Runtime/PatchSystem/BundleInfo.cs @@ -103,6 +103,22 @@ namespace YooAsset } + /// + /// 资源包是否有效 + /// + public bool IsValid() + { + return _patchBundle != null; + } + + /// + /// 资源包文件是否在云端 + /// + public bool InCloud() + { + return LoadMode == ELoadMode.LoadFromRemote; + } + /// /// 获取流文件夹的加载路径 ///