From 50c485c1f866d2edc9bfe6215bd2c346b8d730f1 Mon Sep 17 00:00:00 2001 From: Le Duc Anh Date: Wed, 20 May 2026 12:05:30 +0700 Subject: [PATCH] handle non-lit model case --- Assets/PerfectWorld/Scripts/World/LitModelHolder.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Assets/PerfectWorld/Scripts/World/LitModelHolder.cs b/Assets/PerfectWorld/Scripts/World/LitModelHolder.cs index 36e5ac4805..4c9ef13186 100644 --- a/Assets/PerfectWorld/Scripts/World/LitModelHolder.cs +++ b/Assets/PerfectWorld/Scripts/World/LitModelHolder.cs @@ -299,6 +299,13 @@ public class LitModelHolder : MonoSingleton { _currentIdxAsset = 0; _maxIdxAsset = _candidatesForLoading.Count; + + // double check if we really need to load and unload objects. + if (_maxIdxAsset <= 0) + { + CallBackAssetLoadingDone(); + return; + } // load the objects that are in the loading range long enough. (_candidateWaitTimeSeconds) foreach (var kvp in _candidatesForLoading) {