GUI Rendering Order Issue

Hi, I created a simple GUI and it appears that the box node that I created is rendering over the text node when I want the opposite, and despite me trying to resolve it with layers, render order, and parenting, I have seen no difference in the rendering order.

I am using the default render script, and I have a GUI script attached that does nothing. The interesting thing is that, in the editor, the render order looks correct, but when I build, the button draws over the text. I’m not sure what’s causing the draw order to change, but I’m now thinking it has to do with the render script or some post-startup scripts, assuming I didn’t miss anything. Any thoughts?

In this image, I can confirm that there are no layers being applied to the button or play text.

Yes that’s because Defold follows a bottom to top approach for displaying gui. That means that the lower node appears on the top of upper nodes. Move the text node below the box node and you’ll get what you want.

I’ve tried that. I actually tried putting the box at the top of the node list (using alt+up), then just laying all my text over each other, and the button below all of that, and the button still renders over all of the text when I run the build. The rendering order in the image is actually technically correct, because parents should get drawn before children, so the children will be on top.

Isolate this down to a single collection, gui and gui-script and zip the whole project and share it here.

Ah, ok, after creating a new project I can not recreate the issue. It must just be specific to my gui file, so I’ll just recreate that. Thanks