diff --git a/libs/ecs/source/container.cpp b/libs/ecs/source/container.cpp index 6fe56039..067e8416 100644 --- a/libs/ecs/source/container.cpp +++ b/libs/ecs/source/container.cpp @@ -47,11 +47,14 @@ namespace psemek::ecs if (table->get_iteration_data()) table = table->get_delayed_table(); - auto id = entity_list_.create(table, table->row_count()); + auto row = table->row_count(); + auto id = entity_list_.create(table, row); handle handle{id, entity_list_.get_entities()[id].epoch}; table->copy_row(handle, data.table, data.row); + table->trigger_constructors(*this, row); + return handle; }