how to make global labels in front and GUI.BringWindowToBack(ID);

void OnGUI() {
// 2 labels for screen X/Y detection for GUI elements
GUI.Label(new Rect(0,0,100,20),Event.current.mousePosition.x.ToString());
GUI.Label(new Rect(0,20,100,20),Event.current.mousePosition.y.ToString());
// label for screen Y detection for input mouse position
GUI.Label(new Rect(0,60,100,20),Input.mousePosition.y.ToString());

        WindowInventory = GUI.Window(InventoryID, WindowInventory, InventoryF, "Inventory", "Box");
	private void InventoryF (int id) {
		GUI.DragWindow(new Rect(0,0,WindowInventory.width,20));

now this inventory window will stay in front of Global labels how do I bring that labels in front without giving another window?

why because I’m using global buttons to drag and drop in Equip and it’s annoying if they are in back while they should be in front

from window to window

Windows are always drawn after the usual GUI stuff. So what you can do is put the other things also in a window then you can put one in front of another.

Another solution is to not use a window at all and draw your inventory before your “global labels”. In this case, it you need the dragging functionality you have to implement this yourself, but it isn’t too hard :wink: