VBoxContainer separation property

4.5.1 stable
VBoxContainer should contain a separation property but it doesn’t appear to. I even enumerated out the properties. I’ve used get_theme_constant("separation", "VBoxContainer") instead for now.

Still new to Godot so am I misunderstanding something?

It’s in the Inspector (right-hand side of the editor), under Control → Theme Overrides → Constants → Separation.

2 Likes

I’m referring to getting it by code. It’s listed in the properties for BoxContainer and assumed it was inherited since it is useful to access in code.

It isn’t actually a property in BoxContainer, it’s a theme property. So get_theme_constant("separation", "VBoxContainer") (what you’ve got already) is the only way to access it, although you can leave out the second parameter "VBoxContainer" because the theme type of the node is automatically used: get_theme_constant("separation")

3 Likes