How do I get the position of a button

Godot Version

Godot 4.2.2

Question

godot-4 UI
I’ve searched online how to get the position, and I were told to use rect_global_position which didn’t work because it was for godot 3, so i searched for the equivalent in godot 4, which I found out to be simply global_position, which too didn’t work.
I also cannot find the position of the button anywhere in the inspector (might be dumb)

Any help is appreciated, thanks in advance

the buttons position should be under “Transform”->“Position” or in code button.position

I have no idea in what changed, but it works now ty

1 Like

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