Oh, in that case, there are two ways you can do this easily, depending on your project and what you are looking for.
The easiest is to have the label node as a child of the Camera2D node. Then move move/translate it to whatever position you want it to be fixed to. Then it should stay relative to that position.
The second way is to use a Control node with the anchor set to full rect
, and then have the label as a child-node of that Control node. Then you can set the anchor of the child label node to whatever corner/position is closest to where you want the label to stay with a scaled screen.
To set the anchor easily in the editor, when you select a Control node there should be a dropdown called Layout
, if I recall correctly, which allows you to set the anchors.
Additionally, you'll need to go to the project settings and set the scale mode. I think its project settings -> display/window -> expand mode
. There should be two options: 2d and viewport. There should also be settings there to handle different aspect ratios.
I think either method should give you the same result. I have not had the time to test either, but I think I've used both in various projects and its worked okay.