This is rather strange.
I have a window function like this, drawing straight into the scene GUI in OnSceneGUI.
Handles.BeginGUI();
TestWindow = GUI.Window(TestWindowID, TestWindow, (id) =>
{
GUILayout.Label("TestWindow");
foreach (var vs in SelectedVertexes)
{
GUILayout.BeginHorizontal();
GUILayout.Label(vs.slot.slotName + " " + vs.vertexIndexOnSlot);
GUILayout.EndHorizontal();
}
GUI.DragWindow();
}, "Test Window");
Handles.EndGUI();
This window sometimes drags… and most times, it does not! I don’t know what is causing it to stop dragging. The only clue I have is that if I do not put BeginHorizontal and EndHorizontal in there, it always drags correctly.
If there are no items, it drags correctly. Likely because BeginHorizontal and EndHorizontal are not called.
If there are one or more items, it does not drag.
There are zero errors, warnings and info messages.
This is a weird one. Has anyone seen this behavior before? This is 2021.3