- I have text bubbles, that normally
display properly. There is a bubble
graphic, and a child text object
displayed at a higher layer. the text displays in front of the bubble and is readable, except in this certain scenario, that I’m trying to solve. - I also have pop-up damage counters, that are
text objects. These appear behind the
text bubbles. If there are any of
them alive in the scene though, the
text inside the text bubbles
disappears…
Here you see the empty text bubbles, and one of the red pop-up damage numbers. (The red “1” is actually 6 pixels tall, so the top 2 pixels are being covered by the text bubble)
If I move the text bubbles though, I can see the text displayed behind them… (what the hell?!?) Yet, when all the pop-up damage is gone, the text in the text bubbles returns to back in front of the bubbles…
Here I’ve moved the bubble to the side, and the vanished text is there, hiding.
-
As a test, I moved the pop-up damage to a layer ABOVE the text bubbles. This made the text bubble text appear again… The problem being, that I didn’t want the pop-up damage appearing in front of the text bubbles. (not letting me attach a 3rd image sadly)
-
I also tried swapping the order in the hierarchy, of the parent objects of either my pop-up text or the dialog text-bubbles. This didn’t seem to change anything.
So my best guess about this is that it means that text is only displayed on one layer ever, and the newest text sets that layer… This sounds crazy to me though. Can anyone set me straight on what is going on?
-
Each text object is child of an object with a canvas, and each of those objects is also child of an object with a canvas, and so on all the way to the top canvas which is set to worldspace, and the camera set to orthogonal.
-
The Text bubbles are code-instantiated prefabs, where the text is changed at the time they are instantiated. The same is true of the pop-up damage, but the damage spawns much more frequently than the text-bubbles. the pop-up damage lasts for only a second or so, before vanishing. When all pop-up damage is gone, the text bubble text is drawn properly again.
I’ve run out of ideas to try! Any ideas are appreciated!