Hi,
i am doing custom window where i draw my own windows with some objects inspectors. My problem now is to block input to the inspector that is drawn underneath other one.
Now when my windows overlap on each other inspector below is taking mouse input very often. Like i have two float fields overlap and when i click on top one, the one from below is getting focus.
I tried GUI.depth but it seems not to have any impact.
Any ideas?
You know that the IMGUI actually has a Window method? The main point of this is to allow overlapping GUI areas. Since we have no idea how you’ve implemented your own solution we can’t really help you. The IMGUI is an immediate mode GUI. That means everything happens immediately in the order you specified. The drawing order is also the order in which the controls are processed for input. GUI.Window / GUILayout.Window are seperate sub sections. Since they are drawn through a callback Unity can process all windows “forward” when repainting and “backwards” when processing input.