diff --git a/Assets/YooAsset/Runtime/ResourceManager/Operation/UnloadSceneOperation.cs b/Assets/YooAsset/Runtime/ResourceManager/Operation/UnloadSceneOperation.cs index 74bc291..9d4a750 100644 --- a/Assets/YooAsset/Runtime/ResourceManager/Operation/UnloadSceneOperation.cs +++ b/Assets/YooAsset/Runtime/ResourceManager/Operation/UnloadSceneOperation.cs @@ -31,6 +31,22 @@ namespace YooAsset { _error = null; _provider = provider; + + // 注意:卸载场景前必须先解除挂起操作 + if (provider is DatabaseSceneProvider) + { + var temp = provider as DatabaseSceneProvider; + temp.UnSuspendLoad(); + } + else if (provider is BundledSceneProvider) + { + var temp = provider as BundledSceneProvider; + temp.UnSuspendLoad(); + } + else + { + throw new System.NotImplementedException(); + } } internal override void InternalOnStart() {