fix: bootstrap process ticks after runtime script attach
This commit is contained in:
@@ -135,11 +135,13 @@ func _build_player() -> void:
|
|||||||
camera.position = Vector3(0, 1.7, -3)
|
camera.position = Vector3(0, 1.7, -3)
|
||||||
player.add_child(camera)
|
player.add_child(camera)
|
||||||
|
|
||||||
# set_script() does NOT call _ready(); bootstrap manually after children are in place
|
# set_script() does not call any callbacks; bootstrap them manually after children are in place
|
||||||
if player.has_method("_ready"):
|
if player.has_method("_ready"):
|
||||||
player._ready()
|
player._ready()
|
||||||
if sm.has_method("_ready"):
|
if sm.has_method("_ready"):
|
||||||
sm._ready()
|
sm._ready()
|
||||||
|
if player.has_method("_ensure_process"):
|
||||||
|
player._ensure_process()
|
||||||
|
|
||||||
|
|
||||||
func _build_ui() -> void:
|
func _build_ui() -> void:
|
||||||
|
|||||||
Reference in New Issue
Block a user