Hello All!
According to the docs, GUI.Window is supposed to be over all the normal GUI elements, such as GUI.Box or GUI.DrawTexture.
For whatever reason, my GUI.Window are always behind my GUI elements. I am not using any GUI.depth or anything crazy like that.
Is there something I can check? This is causing me all sorts of grief trying to make floating windows that are always behind the normal elements.
Thanks!
if they arent in the same ongui, they will have depth layer controlled through gui.depth
the “is always” stuff only applies within the same ongui
can you put a screenshot how your windows behind gui elements look like?
Can you have multiple GUI.depth in the same OnGUI?
GUI.depth applies to the whole script - you should only set it once. You can, however, have several scripts with different depths attached to the same GameObject.
GUI.depths only handles the depth between scripts
within the same script, the order of commands defines their “depth order”.
whats drawn last is on top, whats drawn first, is furthest in the back