From 1c2bbfea93b6057a6af7d995393230551937a087 Mon Sep 17 00:00:00 2001 From: hevinci Date: Thu, 9 Feb 2023 16:57:01 +0800 Subject: [PATCH] update asset system MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复了WEBGL平台加载原生文件失败的问题 --- Assets/YooAsset/Runtime/AssetSystem/AssetSystem.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Assets/YooAsset/Runtime/AssetSystem/AssetSystem.cs b/Assets/YooAsset/Runtime/AssetSystem/AssetSystem.cs index 4bcab85..0ddabbd 100644 --- a/Assets/YooAsset/Runtime/AssetSystem/AssetSystem.cs +++ b/Assets/YooAsset/Runtime/AssetSystem/AssetSystem.cs @@ -350,8 +350,11 @@ namespace YooAsset return loader; // 新增下载需求 -#if UNITY_WEBGL - loader = new AssetBundleWebLoader(this, bundleInfo); +#if !UNITY_WEBGL + if (bundleInfo.Bundle.IsRawFile) + loader = new RawBundleFileLoader(this, bundleInfo); + else + loader = new AssetBundleWebLoader(this, bundleInfo); #else if (bundleInfo.Bundle.IsRawFile) loader = new RawBundleFileLoader(this, bundleInfo);