fix(client): create TabContainer children programmatically

Godot 4.6 TabContainer silently destroys children defined in .tscn
during scene instantiation ("Parent path has vanished"). Moving tab
shell creation to _ready() fixes the right-side settings panel.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-22 18:41:24 +01:00
co-authored by Claude Opus 4.6
parent 18ee89d066
commit a2ef1c34cb
2 changed files with 8 additions and 15 deletions
+7
View File
@@ -221,6 +221,13 @@ func _ready() -> void:
_rotate_left_btn.text = UIStrings.get_text("character_creation.btn_rotate_left")
_rotate_right_btn.text = UIStrings.get_text("character_creation.btn_rotate_right")
# Create tab shells programmatically (Godot 4.6 TabContainer requires runtime children)
var tab_names: Array[String] = ["Body", "Head", "Hair", "Clothing", "Accessories"]
for tab_name in tab_names:
var tab := Control.new()
tab.name = tab_name
_tab_container.add_child(tab)
_build_body_tab(_tab_container.get_child(0))
_build_head_tab(_tab_container.get_child(1))
_build_hair_tab(_tab_container.get_child(2))