diff --git a/ecsact/entt/wrapper/core.hh b/ecsact/entt/wrapper/core.hh index 9c53cf3..0537953 100644 --- a/ecsact/entt/wrapper/core.hh +++ b/ecsact/entt/wrapper/core.hh @@ -467,6 +467,7 @@ inline auto prepare_component(ecsact_registry_id registry_id) -> void { if constexpr(!std::is_empty_v) { reg.template storage>(); reg.template storage>(); + reg.template storage>(); } } diff --git a/rt_entt_codegen/core/init_registry_storage.cc b/rt_entt_codegen/core/init_registry_storage.cc index 6cc7365..02f6ad7 100644 --- a/rt_entt_codegen/core/init_registry_storage.cc +++ b/rt_entt_codegen/core/init_registry_storage.cc @@ -16,6 +16,11 @@ auto ecsact::rt_entt_codegen::core::print_init_registry_storage( .parameter("ecsact_registry_id", "registry_id") .return_type("void"); + ctx.write("auto& reg = ecsact::entt::get_registry(registry_id);\n"); + ctx.write( + "reg.template storage();\n\n" + ); + for(auto comp_id : details.all_components) { auto cpp_comp_name = cpp_identifier(decl_full_name(comp_id));