diff --git a/client/ui/character_creation.gd b/client/ui/character_creation.gd index 6e9da693a..bdde8be02 100644 --- a/client/ui/character_creation.gd +++ b/client/ui/character_creation.gd @@ -112,7 +112,7 @@ const RECENT_SLOTS := 9 @onready var _rotate_left_btn: Button = $Layout/PreviewPanel/PreviewOverlay/RotateButtons/RotateLeftBtn @onready var _rotate_right_btn: Button = $Layout/PreviewPanel/PreviewOverlay/RotateButtons/RotateRightBtn @onready var _cam_angle_btn: Button = $Layout/PreviewPanel/PreviewOverlay/CamAngleBtn -@onready var _tab_container: TabContainer = $Layout/TabPanel/TabContainer +var _tab_container: TabContainer = null # resolved in _ready() — @onready path fails when instantiated as child @onready var _footer_back: Button = $Footer/BackBtn @onready var _footer_randomize: Button = $Footer/RandomizeBtn @onready var _footer_start: Button = $Footer/StartBtn @@ -195,6 +195,12 @@ var _tab_grids: Array[GridContainer] = [null, null, null, null, null] # ============================================================================= func _ready() -> void: + # Resolve TabContainer — @onready path fails when scene is instantiated as child of MainMenu + _tab_container = find_child("TabContainer", true, false) as TabContainer + if _tab_container == null: + push_error("CharacterCreation: TabContainer not found in scene tree") + return + _descriptor = CharacterVisualDescriptor.new() _descriptor.body_type = CharacterVisualDescriptor.BodyType.AVERAGE_M _descriptor.skin_tone = 2 # light_olive — readable middle-ground default