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(); + } } ///