From 9a84cdef9f34a05bcd837ae26c316cde4a9e079f Mon Sep 17 00:00:00 2001 From: hevinci Date: Fri, 14 Apr 2023 16:42:43 +0800 Subject: [PATCH] fix #48 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 优化了场景卸载机制,在切换场景的时候不在主动卸载资源。 --- Assets/YooAsset/Runtime/AssetSystem/AssetSystem.cs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Assets/YooAsset/Runtime/AssetSystem/AssetSystem.cs b/Assets/YooAsset/Runtime/AssetSystem/AssetSystem.cs index 5961c74..68eae1c 100644 --- a/Assets/YooAsset/Runtime/AssetSystem/AssetSystem.cs +++ b/Assets/YooAsset/Runtime/AssetSystem/AssetSystem.cs @@ -297,9 +297,6 @@ namespace YooAsset // 释放子场景句柄 _sceneHandles[providerGUID].ReleaseInternal(); _sceneHandles.Remove(providerGUID); - - // 卸载未被使用的资源(包括场景) - UnloadUnusedAssets(); } internal void UnloadAllScene() { @@ -309,9 +306,6 @@ namespace YooAsset valuePair.Value.ReleaseInternal(); } _sceneHandles.Clear(); - - // 卸载未被使用的资源(包括场景) - UnloadUnusedAssets(); } internal void ClearSceneHandle() {