Drawing of the scene handles, texts, etc. breaks when a scene was added to the hierarchy additively and is then unloaded.
(e.g. by dragging it under the current scene) The drawing still works.
(right click -> unload scene) Drawing breaks, exceptions are logged to the console.
ArgumentException: The scene is not loaded.
UnityEngine.SceneManagement.Scene.GetRootGameObjects (System.Collections.Generic.List`1[T] rootGameObjects) (at <ef667cdc82bf4a4e911d1ddea9ff581d>:0)
UnityEngine.SceneManagement.Scene.GetRootGameObjects () (at <ef667cdc82bf4a4e911d1ddea9ff581d>:0)
LDtkUnity.Editor.LDtkFindInScenes.FindInScene[T] (UnityEngine.SceneManagement.Scene scene) (at Library/PackageCache/[email protected]/Editor/CustomEditor/SceneDrawer/LDtkFindInScenes.cs:37)
LDtkUnity.Editor.LDtkFindInScenes.FindInAllScenes[T] () (at Library/PackageCache/[email protected]/Editor/CustomEditor/SceneDrawer/LDtkFindInScenes.cs:24)
LDtkUnity.Editor.LDtkSceneDrawer.DrawEntityDrawers () (at Library/PackageCache/[email protected]/Editor/CustomEditor/SceneDrawer/LDtkSceneDrawer.cs:44)
LDtkUnity.Editor.LDtkSceneDrawer.CustomOnSceneGUI (UnityEditor.SceneView view) (at Library/PackageCache/[email protected]/Editor/CustomEditor/SceneDrawer/LDtkSceneDrawer.cs:19)
UnityEditor.SceneView.CallOnSceneGUI () (at <015079d9a4ea4f97b4381e694d2310c1>:0)
UnityEditor.SceneView.HandleSelectionAndOnSceneGUI () (at <015079d9a4ea4f97b4381e694d2310c1>:0)
UnityEditor.SceneView.OnGUI () (at <015079d9a4ea4f97b4381e694d2310c1>:0)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at <015079d9a4ea4f97b4381e694d2310c1>:0)
UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect) (at <015079d9a4ea4f97b4381e694d2310c1>:0)
UnityEditor.DockArea.OldOnGUI () (at <015079d9a4ea4f97b4381e694d2310c1>:0)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <1fd6bc3af931450b977286a218b046fb>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <1fd6bc3af931450b977286a218b046fb>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <1fd6bc3af931450b977286a218b046fb>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Boolean canAffectFocus) (at <1fd6bc3af931450b977286a218b046fb>:0)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUIRaw (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at <1fd6bc3af931450b977286a218b046fb>:0)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at <1fd6bc3af931450b977286a218b046fb>:0)
UnityEngine.UIElements.EventDispatchUtilities.PropagateToIMGUIContainer (UnityEngine.UIElements.VisualElement root, UnityEngine.UIElements.EventBase evt) (at <1fd6bc3af931450b977286a218b046fb>:0)
UnityEngine.UIElements.EventDispatchUtilities.PropagateToIMGUIContainer (UnityEngine.UIElements.VisualElement root, UnityEngine.UIElements.EventBase evt) (at <1fd6bc3af931450b977286a218b046fb>:0)
UnityEngine.UIElements.MouseEventDispatchingStrategy.SendEventToIMGUIContainer (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at <1fd6bc3af931450b977286a218b046fb>:0)
UnityEngine.UIElements.MouseEventDispatchingStrategy.SendEventToTarget (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at <1fd6bc3af931450b977286a218b046fb>:0)
UnityEngine.UIElements.MouseEventDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel iPanel) (at <1fd6bc3af931450b977286a218b046fb>:0)
UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at <1fd6bc3af931450b977286a218b046fb>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <1fd6bc3af931450b977286a218b046fb>:0)
UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at <1fd6bc3af931450b977286a218b046fb>:0)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at <1fd6bc3af931450b977286a218b046fb>:0)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <1fd6bc3af931450b977286a218b046fb>:0)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at <1fd6bc3af931450b977286a218b046fb>:0)
UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <1fd6bc3af931450b977286a218b046fb>:0)
UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at <1fd6bc3af931450b977286a218b046fb>:0)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at <6ddf8eac3856492ab1b8cf42618915cc>:0)