Skip to content

Commit 81ffe9b

Browse files
committed
feat: move events collector on base ecsact runner
1 parent dbb2e92 commit 81ffe9b

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

Source/Ecsact/Public/EcsactAsyncRunner.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ UCLASS(NotBlueprintable)
1212
class UEcsactAsyncRunner : public UEcsactRunner {
1313
GENERATED_BODY()
1414
public:
15-
UPROPERTY()
16-
class UEcsactUnrealEventsCollector* EventsCollector;
17-
1815
auto Tick(float DeltaTime) -> void override;
1916
auto GetStatId() const -> TStatId override;
2017
};

Source/Ecsact/Public/EcsactRunner.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
#pragma once
22

33
#include "CoreMinimal.h"
4-
#include "Tickable.h"
5-
#include "UObject/NoExportTypes.h"
64
#include "EcsactRunner.generated.h"
75

86
UCLASS(Abstract)
97

108
class UEcsactRunner : public UObject, public FTickableGameObject {
119
GENERATED_BODY()
10+
11+
protected:
12+
UPROPERTY()
13+
class UEcsactUnrealEventsCollector* EventsCollector;
14+
1215
public:
1316
auto Tick(float DeltaTime) -> void override;
1417
auto GetStatId() const -> TStatId override;

Source/Ecsact/Public/EcsactSyncRunner.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,12 @@ auto UEcsactSyncRunner::Tick(float DeltaTime) -> void {
2121
registry_id = ecsact_create_registry("Default Registry");
2222
}
2323

24-
auto err = ecsact_execute_systems(registry_id, 1, nullptr, nullptr);
24+
ecsact_execution_events_collector* evc_c = nullptr;
25+
if(EventsCollector != nullptr) {
26+
evc_c = EventsCollector->GetCEVC();
27+
}
28+
29+
auto err = ecsact_execute_systems(registry_id, 1, nullptr, evc_c);
2530
if(err != ECSACT_EXEC_SYS_OK) {
2631
UE_LOG(Ecsact, Error, TEXT("Ecsact execution failed"));
2732
}

0 commit comments

Comments
 (0)