From 73e6ba9dd49ccd28f05f1b926fd936e50f7d7abc Mon Sep 17 00:00:00 2001 From: Ezekiel Warren Date: Thu, 15 Aug 2024 13:59:42 -0700 Subject: [PATCH] fix: runner tick is always running (debugging) --- Source/Ecsact/Public/EcsactAsyncRunner.cpp | 5 +++++ Source/Ecsact/Public/EcsactAsyncRunner.h | 1 + Source/Ecsact/Public/EcsactRunner.cpp | 2 +- Source/Ecsact/Public/EcsactSyncRunner.cpp | 5 +++++ Source/Ecsact/Public/EcsactSyncRunner.h | 1 + 5 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Source/Ecsact/Public/EcsactAsyncRunner.cpp b/Source/Ecsact/Public/EcsactAsyncRunner.cpp index 262b5ee..450a8a2 100644 --- a/Source/Ecsact/Public/EcsactAsyncRunner.cpp +++ b/Source/Ecsact/Public/EcsactAsyncRunner.cpp @@ -5,6 +5,7 @@ #include "ecsact/runtime/common.h" auto UEcsactAsyncRunner::Tick(float DeltaTime) -> void { + UE_LOG(Ecsact, Log, TEXT("ASYNC RUNNER TICK()")); if(ecsact_async_flush_events == nullptr) { UE_LOG(Ecsact, Error, TEXT("ecsact_async_flush_events is unavailable")); } else { @@ -15,3 +16,7 @@ auto UEcsactAsyncRunner::Tick(float DeltaTime) -> void { ecsact_async_flush_events(evc_c, nullptr); } } + +auto UEcsactAsyncRunner::GetStatId() const -> TStatId { + RETURN_QUICK_DECLARE_CYCLE_STAT(UEcsactAsyncRunner, STATGROUP_Tickables); +} diff --git a/Source/Ecsact/Public/EcsactAsyncRunner.h b/Source/Ecsact/Public/EcsactAsyncRunner.h index de41d69..6c1673d 100644 --- a/Source/Ecsact/Public/EcsactAsyncRunner.h +++ b/Source/Ecsact/Public/EcsactAsyncRunner.h @@ -16,4 +16,5 @@ class UEcsactAsyncRunner : public UEcsactRunner { class UEcsactUnrealEventsCollector* EventsCollector; auto Tick(float DeltaTime) -> void override; + auto GetStatId() const -> TStatId override; }; diff --git a/Source/Ecsact/Public/EcsactRunner.cpp b/Source/Ecsact/Public/EcsactRunner.cpp index 31e74c1..227f987 100644 --- a/Source/Ecsact/Public/EcsactRunner.cpp +++ b/Source/Ecsact/Public/EcsactRunner.cpp @@ -4,5 +4,5 @@ auto UEcsactRunner::Tick(float DeltaTime) -> void { } auto UEcsactRunner::GetStatId() const -> TStatId { - RETURN_QUICK_DECLARE_CYCLE_STAT(UTickableObject, STATGROUP_Tickables); + RETURN_QUICK_DECLARE_CYCLE_STAT(UEcsactRunner, STATGROUP_Tickables); } diff --git a/Source/Ecsact/Public/EcsactSyncRunner.cpp b/Source/Ecsact/Public/EcsactSyncRunner.cpp index 3e02fae..ed5d9c3 100644 --- a/Source/Ecsact/Public/EcsactSyncRunner.cpp +++ b/Source/Ecsact/Public/EcsactSyncRunner.cpp @@ -4,6 +4,7 @@ #include "ecsact/runtime/core.h" auto UEcsactSyncRunner::Tick(float DeltaTime) -> void { + UE_LOG(Ecsact, Log, TEXT("SYNC RUNNER TICK()")); if(ecsact_execute_systems == nullptr) { UE_LOG(Ecsact, Error, TEXT("ecsact_execute_systems is unavailable")); return; @@ -26,3 +27,7 @@ auto UEcsactSyncRunner::Tick(float DeltaTime) -> void { UE_LOG(Ecsact, Error, TEXT("Ecsact execution failed")); } } + +auto UEcsactSyncRunner::GetStatId() const -> TStatId { + RETURN_QUICK_DECLARE_CYCLE_STAT(UEcsactSyncRunner, STATGROUP_Tickables); +} diff --git a/Source/Ecsact/Public/EcsactSyncRunner.h b/Source/Ecsact/Public/EcsactSyncRunner.h index 8627673..7bf1e5f 100644 --- a/Source/Ecsact/Public/EcsactSyncRunner.h +++ b/Source/Ecsact/Public/EcsactSyncRunner.h @@ -16,4 +16,5 @@ class UEcsactSyncRunner : public UEcsactRunner { ecsact_registry_id registry_id = ECSACT_INVALID_ID(registry); auto Tick(float DeltaTime) -> void override; + auto GetStatId() const -> TStatId override; };