diff --git a/editor/limbo_ai_editor_plugin.cpp b/editor/limbo_ai_editor_plugin.cpp index 8fb0939..0c42909 100644 --- a/editor/limbo_ai_editor_plugin.cpp +++ b/editor/limbo_ai_editor_plugin.cpp @@ -526,7 +526,7 @@ void LimboAIEditor::_on_action_selected(int p_id) { if (parent.is_null()) { parent = sel; } - parent->add_child(sel->clone()); + parent->add_child_at_index(sel->clone(), parent->get_child_index(sel) + 1); task_tree->update_tree(); _mark_as_dirty(true); }