Losing margin changes in HBoxContainer

I noticed that when I modify the margin settings for the textureRect’s inside the HBoxContainer they don’t get applied when the game plays. Also when you close and open the GUI scene they are reset. It’s a little hard to see but I think this also happens in Yann’s video.

Anyone else get this behaviour? I’m just trying to work out if it’s me or Godot.

I believe it’s a default behaviour for HBoxContainer and VBoxContainer. “Alignment” property of container overrides all margin values that were typed manually for it’s childrens. I changed HBoxContainer to a regular Container and the problem disappeared, i could tweak all the margins however i wanted.

3 Likes

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

Privacy & Terms