Changing a property of a control node in a container reset it's scale

Godot Version

Godot 4.4 Beta 3

Question

I have a label that I’m changing the scale in ready.

label.scale = Vector2.ZERO

But when i change the text of the label the scale resets to vector(1, 1)

label.text = 'some text'

Removing this part of the code resolves the issue.

Is this intended? or is an issue whit 4.4 beta 3? i know that you have to wait a process frame when the scene is instantiated but I’m doing that before hand so is not that.

Any help is appreciated and also I’m using Godot 4.4 beta 3

Thanks in advance

This is intended. Changing the scale of a Control inside a Container node is not recommended (and even forbidden when you try to do it in the editor), since the Container will force the scale of the children.
If you need animation for your label, you can actually animate/tween the scale, but only if you dont force redraw from the engine (changing text forces a redraw, as well as changing the container for instance)
I hope this clarifies the behavior of Container children

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.