If you are (which I assume you are) creating your gui with gui_scenes you can control all gui rendering “layers” with gui.set_render_order .
I normally have the approach of having a small lua module that has constants like:
return {
BACKGROUND = 1
MAIN = 2
POPUP = 3
LOADER = 4
}
and then call it on all my gui_scenes like
gui.set_render_order(gui_order.POPUP)
I did not understand what gui_scenes were, but the information about gui.set_render_order was really beneficial. It is really good that my problem is resolved neatly in your words. Thank you.
Ah sry for the confusion. I actually just meant a normal gui-component that you add into a gameobject. Don’t know why I thought they were called scenes.
Just to be clear what the answer to the question is: The way you can control the render order of multiple gui components, be they in different collections or not, is via the gui.set_render_order() function.