Label not showing anymore? (SOLVED)

Take a look at the image above. The items here are structured as follows

  1. There is a background layer with a z-index of 0
  2. Above that, in the foreground, I have five items: 4 gems and a heart. All of these have their z-index set at 0.5
  3. Finally I have five labels with the default design time text of 88 (4 times) and 6. The labels have their z-index set at 0.8

Everything shows up correctlhy at design time. However, at run time the labels do not appear. What might I be doing wrong here

Is this GUI? GUI ignores the z position, instead ordering based on layers and order in the project outline (the lowest elements are drawn last - end up on top).

2 Likes

More info: GUI scenes in Defold and GUI scenes in Defold

1 Like

There are simply sprites inside a game object in a collection being loaded via a collection proxy. Not GUI

Hmm… If the labels are children of an object which itself has z position over 0.2, they’d end up with z over 1, which means they wouldn’t be rendered. Could that be the problem?

2 Likes

Yes, that is exactly what had happened. At some point I appear to have accidentally changed the z position for the containing game object to 0.5. And then suddenly, I could not see the labels any more

1 Like

Remember that you can easily change the near and far planes to something other than -1 to 1. The render pipeline in Defold

2 Likes

Nice one - I had never really bothered to figure out just what that {near = -1,far = 1} parameter was meant for. Having control over those two values is really useful.