CanvasLayer children are not appering in screen

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Sputnik
:warning: Old Version Published before Godot 3 was released.

My scene tree is like that, but the box and text node does not appear in the screen

Imgur

Try parenting them to the CanvasLayer node instead of the Timer.

Sigma-One | 2017-09-25 19:12

it stil doesn’t work

Sputnik | 2017-10-02 16:22

I have the same problem, and I can’t find out how to make it visible. As soon as I remove the label from the hierarchy, it shows up. Note that the CanvasLayer hides all nodes, not just labels. I initially tried to set up a progress bar, which didn’t work as well. However, the label is visible in the editor.

CharlyDelta | 2017-10-02 19:02

:bust_in_silhouette: Reply From: CharlyDelta

I don’t know if this also applies to your problem, but I could solve my problem as follows:

I used a camera attached to my player which follows him. All my HUD elements where arranged to that camera.

You must arrange the HUD elements relative to the origin at (0,0), where the blue frame indicates the screen size.

That was my problem. Hope this helps someone on the future.

it works, the problem is that the hud follows the player, and my player doesn’t make the same moviment as the camera, so it is weird.

Sputnik | 2017-10-16 16:44

I was having the HUD visible in the editor, but not in the game. Going over the tutorial I was using the tutor mentioned putting the HUD in the Gaming Window which has 0,0 in the top left corner. My game scene was all over the place. Once I put the HUD inside the original gaming window of Godot, my HUD APPEARED!

Apparently this is a Canvas characteristic based upon the original gaming window size and location.

Godene | 2020-08-24 08:17