From 896681df8784da959d5ef32cc632c0cae6a1c084 Mon Sep 17 00:00:00 2001 From: hevinci Date: Thu, 6 Apr 2023 16:15:25 +0800 Subject: [PATCH] update asset system MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复了资源文件路径无效导致异常的问题。 --- .../Runtime/AssetSystem/Provider/ProviderBase.cs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Assets/YooAsset/Runtime/AssetSystem/Provider/ProviderBase.cs b/Assets/YooAsset/Runtime/AssetSystem/Provider/ProviderBase.cs index b8ede7c..3d3f36e 100644 --- a/Assets/YooAsset/Runtime/AssetSystem/Provider/ProviderBase.cs +++ b/Assets/YooAsset/Runtime/AssetSystem/Provider/ProviderBase.cs @@ -103,13 +103,16 @@ namespace YooAsset MainAssetInfo = assetInfo; // 创建资源包加载器 - OwnerBundle = impl.CreateOwnerAssetBundleLoader(assetInfo); - OwnerBundle.Reference(); - OwnerBundle.AddProvider(this); + if (impl != null) + { + OwnerBundle = impl.CreateOwnerAssetBundleLoader(assetInfo); + OwnerBundle.Reference(); + OwnerBundle.AddProvider(this); - var dependBundles = impl.CreateDependAssetBundleLoaders(assetInfo); - DependBundleGroup = new DependAssetBundleGroup(dependBundles); - DependBundleGroup.Reference(); + var dependBundles = impl.CreateDependAssetBundleLoaders(assetInfo); + DependBundleGroup = new DependAssetBundleGroup(dependBundles); + DependBundleGroup.Reference(); + } } ///