33#include " EcsactUnreal/EcsactUnrealExecutionOptions.h"
44#include " EcsactUnreal/EcsactExecution.h"
55#include " ecsact/runtime/core.h"
6- #include " ecsact/wasm.h"
6+ #include " ecsact/si/wasm.h"
7+
8+ UEcsactSyncRunner::UEcsactSyncRunner () : Super() {
9+ }
710
811auto UEcsactSyncRunner::StreamImpl (
912 ecsact_entity_id Entity,
@@ -45,18 +48,21 @@ auto UEcsactSyncRunner::Tick(float DeltaTime) -> void {
4548 }
4649
4750 if (registry_id != ECSACT_INVALID_ID (registry)) {
48- ecsact_execution_options* exec_opts = nullptr ;
49- if (ExecutionOptions != nullptr && ExecutionOptions->IsNotEmpty ()) {
50- exec_opts = ExecutionOptions->GetCPtr ();
51- }
52-
5351 if (ecsact_execute_systems) {
54- auto err =
55- ecsact_execute_systems (registry_id, 1 , exec_opts, GetEventsCollector ());
52+ ecsact_execution_options* exec_opts = nullptr ;
53+ if (ExecutionOptions != nullptr && ExecutionOptions->IsNotEmpty ()) {
54+ exec_opts = ExecutionOptions->GetCPtr ();
55+ }
56+ auto err = ecsact_execute_systems ( //
57+ registry_id,
58+ 1 ,
59+ exec_opts,
60+ GetEventsCollector ()
61+ );
5662 if (err != ECSACT_EXEC_SYS_OK) {
5763 UE_LOG (Ecsact, Error, TEXT (" Ecsact execution failed" ));
5864 }
59- if (ExecutionOptions) {
65+ if (ExecutionOptions != nullptr ) {
6066 ExecutionOptions->Clear ();
6167 }
6268 } else {
@@ -68,23 +74,23 @@ auto UEcsactSyncRunner::Tick(float DeltaTime) -> void {
6874 }
6975 }
7076
71- if (ecsactsi_wasm_consume_logs != nullptr ) {
72- ecsactsi_wasm_consume_logs (
77+ if (ecsact_si_wasm_consume_logs != nullptr ) {
78+ ecsact_si_wasm_consume_logs (
7379 [](
74- ecsactsi_wasm_log_level log_level,
75- const char * message,
76- int32_t message_length,
77- void * user_data
80+ ecsact_si_wasm_log_level log_level,
81+ const char * message,
82+ int32_t message_length,
83+ void * user_data
7884 ) {
7985 switch (log_level) {
8086 default :
81- case ECSACTSI_WASM_LOG_LEVEL_INFO :
87+ case ECSACT_SI_WASM_LOG_LEVEL_INFO :
8288 UE_LOG (Ecsact, Log, TEXT (" %.*hs" ), message_length, message);
8389 break ;
84- case ECSACTSI_WASM_LOG_LEVEL_WARNING :
90+ case ECSACT_SI_WASM_LOG_LEVEL_WARNING :
8591 UE_LOG (Ecsact, Warning, TEXT (" %.*hs" ), message_length, message);
8692 break ;
87- case ECSACTSI_WASM_LOG_LEVEL_ERROR :
93+ case ECSACT_SI_WASM_LOG_LEVEL_ERROR :
8894 UE_LOG (Ecsact, Error, TEXT (" %.*hs" ), message_length, message);
8995 break ;
9096 }
0 commit comments