Labels visible with engine, not on Android device

#1

I have a GUI screen.

I draw many components that contain 4 labels each. ( I clone the model node many times).
I use a custom font.

When I launch with the Defold engine, I see the labels correctly, on Android, nothing is shown.

I tried setting a different layer to the labels and the rest of the component, but I have the same error.

What is the problem?

Thanks

0 Likes

#2

Please note that there is both a Label component which is a regular Defold component you can attach to a game object and Text Nodes which you use within a GUI. I’m assuming that you actually mean a Text Node in a GUI and not a Label component?

Are you sure the text nodes aren’t hidden behind a box node? Can you share a screenshot of your node hierarchy? And perhaps a minimal project with a single gui component with the problematic node.

Can you also test a basic project with a gui containing a single box and a text node. Does that work on Android?

0 Likes

#3

OK I fixed it.

So basically, I’m using a GUI template, that I’m cloning.
I had to set up the layer in the template inside my main GUI (the template will appear “blue”).

I was making the mistake of modifying the layers in my template, not the real scene.

1 Like

#4

Would it be safe to say that if the node hierarchy is flat and layers are unassigned that the drawing order is undefined/random? Or is there still some drawing ordering?

0 Likes

#5

There is a drawing order. If you have no hierarchy and no layers the nodes are drawn in the order they are arranged in the list. You can rearrange them using Edit->Move Up/Down.

Documented here: https://defold.com/manuals/gui/#draw-order

2 Likes