-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: unreal specific ecsact plugin + starting on ecsact runner (#11)
depends on ecsact-dev/ecsact_cli#120 depends on ecsact-dev/ecsact_codegen#53
- Loading branch information
Showing
28 changed files
with
1,025 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
Checks: 'clang-diagnostic-*,clang-analyzer-*,cppcoreguidelines-*,modernize-*,-modernize-use-trailing-return-type' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
*.png filter=lfs diff=lfs merge=lfs -text | ||
*.dll filter=lfs diff=lfs merge=lfs -text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,5 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: greut/eclint-action@v0 | ||
- uses: jidicula/[email protected] | ||
with: { clang-format-version: "18" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[FilterPlugin] | ||
; This section lists additional files which will be packaged along with your plugin. Paths should be listed relative to the root plugin directory, and | ||
; may include "...", "*", and "?" wildcards to match directories, files, and individual characters respectively. | ||
; | ||
; Examples: | ||
; /README.txt | ||
; /Extras/... | ||
; /Binaries/ThirdParty/*.dll |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#include "EcsactAsyncRunner.h" | ||
#include "Ecsact.h" | ||
#include "EcsactUnrealEventsCollector.h" | ||
#include "ecsact/runtime/async.h" | ||
#include "ecsact/runtime/common.h" | ||
|
||
auto UEcsactAsyncRunner::Tick(float DeltaTime) -> void { | ||
if(ecsact_async_flush_events == nullptr) { | ||
UE_LOG(Ecsact, Error, TEXT("ecsact_async_flush_events is unavailable")); | ||
} else { | ||
ecsact_execution_events_collector* evc_c = nullptr; | ||
if(EventsCollector != nullptr) { | ||
evc_c = EventsCollector->GetCEVC(); | ||
} | ||
ecsact_async_flush_events(evc_c, nullptr); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
|
||
#pragma once | ||
|
||
#include "CoreMinimal.h" | ||
#include "Tickable.h" | ||
#include "UObject/NoExportTypes.h" | ||
#include "EcsactRunner.h" | ||
#include "EcsactAsyncRunner.generated.h" | ||
|
||
UCLASS(NotBlueprintable) | ||
|
||
class UEcsactAsyncRunner : public UEcsactRunner { | ||
GENERATED_BODY() | ||
public: | ||
UPROPERTY() | ||
class UEcsactUnrealEventsCollector* EventsCollector; | ||
|
||
auto Tick(float DeltaTime) -> void override; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#include "EcsactExecution.h" | ||
#include "Ecsact.h" | ||
|
||
float EcsactUnrealExecution::DeltaTime_ = 0.f; | ||
|
||
auto EcsactUnrealExecution::DeltaTime() -> float { | ||
return DeltaTime_; | ||
} | ||
|
||
auto EcsactUnrealExecution::Runner() -> class UEcsactRunner* { | ||
return FEcsactModule::Get().Runner; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#pragma once | ||
|
||
class EcsactUnrealExecution { | ||
friend class UEcsactSyncRunner; | ||
friend class UEcsactAsyncRunner; | ||
static float DeltaTime_; | ||
|
||
public: | ||
/** | ||
* Get the DeltaTime for the current EcsactRunner execution. This should be | ||
* used by Ecsact systems that are built by unreal build tool. | ||
* | ||
* NOTE: This is a workaround until 'execution metadata' is available. | ||
* SEE: https://github.com/ecsact-dev/ecsact_parse/issues/163 | ||
*/ | ||
static auto DeltaTime() -> float; | ||
|
||
/** | ||
* | ||
*/ | ||
static auto Runner() -> class UEcsactRunner*; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#include "EcsactRunner.h" | ||
|
||
auto UEcsactRunner::Tick(float DeltaTime) -> void { | ||
} | ||
|
||
auto UEcsactRunner::GetStatId() const -> TStatId { | ||
RETURN_QUICK_DECLARE_CYCLE_STAT(UTickableObject, STATGROUP_Tickables); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#pragma once | ||
|
||
#include "CoreMinimal.h" | ||
#include "Tickable.h" | ||
#include "UObject/NoExportTypes.h" | ||
#include "EcsactRunner.generated.h" | ||
|
||
UCLASS(Abstract) | ||
|
||
class UEcsactRunner : public UObject, public FTickableGameObject { | ||
GENERATED_BODY() | ||
public: | ||
auto Tick(float DeltaTime) -> void override; | ||
auto GetStatId() const -> TStatId override; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.