Skip to content

Commit

Permalink
fix: runner tick is always running (debugging)
Browse files Browse the repository at this point in the history
  • Loading branch information
zaucy committed Aug 15, 2024
1 parent 7992468 commit 73e6ba9
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 1 deletion.
5 changes: 5 additions & 0 deletions Source/Ecsact/Public/EcsactAsyncRunner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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);
}
1 change: 1 addition & 0 deletions Source/Ecsact/Public/EcsactAsyncRunner.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ class UEcsactAsyncRunner : public UEcsactRunner {
class UEcsactUnrealEventsCollector* EventsCollector;

auto Tick(float DeltaTime) -> void override;
auto GetStatId() const -> TStatId override;
};
2 changes: 1 addition & 1 deletion Source/Ecsact/Public/EcsactRunner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
5 changes: 5 additions & 0 deletions Source/Ecsact/Public/EcsactSyncRunner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
}
1 change: 1 addition & 0 deletions Source/Ecsact/Public/EcsactSyncRunner.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

0 comments on commit 73e6ba9

Please sign in to comment.