diff --git a/Editor/LTCGI_Controller.cs b/Editor/LTCGI_Controller.cs index affa12b..7f41bde 100644 --- a/Editor/LTCGI_Controller.cs +++ b/Editor/LTCGI_Controller.cs @@ -148,7 +148,11 @@ public void UpdateMaterials(bool fast, LTCGI_Screen screen = null) return; if (Lightmapping.isRunning) return; - if (UnityEngine.SceneManagement.SceneManager.loadedSceneCount == 0) + #if UNITY_2022_1_OR_NEWER + if (UnityEngine.SceneManagement.SceneManager.loadedSceneCount == 0) + #else + if (UnityEditor.SceneManagement.EditorSceneManager.loadedSceneCount == 0) + #endif return; #if DEBUG_LOG