From 7e20c39fb3caf563126e7dcf18eb86da1e5d07a2 Mon Sep 17 00:00:00 2001 From: hevinci Date: Tue, 30 Aug 2022 18:04:16 +0800 Subject: [PATCH] Update asset system MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 支持WebGL --- .../AssetSystem/Loader/AssetBundleWebLoader.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Assets/YooAsset/Runtime/AssetSystem/Loader/AssetBundleWebLoader.cs b/Assets/YooAsset/Runtime/AssetSystem/Loader/AssetBundleWebLoader.cs index cf38d3e..3fcdafb 100644 --- a/Assets/YooAsset/Runtime/AssetSystem/Loader/AssetBundleWebLoader.cs +++ b/Assets/YooAsset/Runtime/AssetSystem/Loader/AssetBundleWebLoader.cs @@ -38,7 +38,17 @@ namespace YooAsset if (_steps == ESteps.None) { - if (MainBundleInfo.LoadMode == BundleInfo.ELoadMode.LoadFromStreaming) + if (MainBundleInfo.LoadMode == BundleInfo.ELoadMode.LoadFromRemote) + { + _steps = ESteps.LoadFile; + _webURL = MainBundleInfo.RemoteMainURL; + } + else if (MainBundleInfo.LoadMode == BundleInfo.ELoadMode.LoadFromCache) + { + _steps = ESteps.LoadFile; + _webURL = MainBundleInfo.Bundle.CachedFilePath; + } + else if (MainBundleInfo.LoadMode == BundleInfo.ELoadMode.LoadFromStreaming) { _steps = ESteps.LoadFile; _webURL = MainBundleInfo.Bundle.StreamingFilePath;