I have the tree as:
Root
- gameLevel
-- HUD
---HBoxContainer
This is the code:
func drawLifeIndicators():
var containerBox = get_node("HUD/HBoxContainer")
var scene = load("res://batMini.tscn")
var newBatMini
for i in range(0, globals.lives):
newBatMini = scene.instance()
print("adding mini")
#containerBox.add_spacer(true)
containerBox.add_child(newBatMini)
If I check the inspector, yes, all 3 (in this case) life indicators show up as direct children of the HBoxContainer, BUT they all appear to be showing up in the same physical place. Can anyone see why they're being generated in the same position?