Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions addons/godot_rl_agents/sync.gd
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ var _obs_space_training: Array[Dictionary] = []

# Called when the node enters the scene tree for the first time.
func _ready():
await get_parent().ready
get_tree().set_pause(true)
_initialize()
await get_tree().create_timer(1.0).timeout
get_tree().set_pause(false)
call_deferred("_try_initialize")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
call_deferred("_try_initialize")
_try_initialize.call_deferred()


func _try_initialize():
if not initialized:
_initialize()


func _initialize():
Expand Down