From c8e6f15a3c1dfb736454a6a23c2e3f7c7cc12ad9 Mon Sep 17 00:00:00 2001 From: Kelwan Date: Fri, 8 Nov 2024 13:03:43 -0800 Subject: [PATCH] chore: Add prepare for stream and destroyed_entity markers --- ecsact/entt/wrapper/core.hh | 1 + rt_entt_codegen/core/init_registry_storage.cc | 5 +++++ 2 files changed, 6 insertions(+) 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));