Search Unity

GUI.Window always on top. Why?

Discussion in 'Immediate Mode GUI (IMGUI)' started by Fuzzypup, Aug 30, 2020.

  1. Fuzzypup

    Fuzzypup

    Joined:
    Aug 13, 2013
    Posts:
    190
    private void OnGUI() {
    GUI.skin = gameSkin;
    windowRect = GUI.Window(0, windowRect, DoMyWindow, total);
    UIMatrix.Clear();
    }

    void DoMyWindow(int windowID) {
    GUI.DragWindow();
    }

    I have this script running after I updated from 2017 to 2019. One of my players is saying that this window is now appearing above all other guis. It is supposed to appear behind meny items as it is a map information panel. I tried GUI.Depth setting it higher than my main gui but it doesnt work.

    I researched this but I can't find an answer.

    No I don't use the WYSIWYG system. I like hard coding my GUI.