File tree Expand file tree Collapse file tree 4 files changed +37
-0
lines changed
Expand file tree Collapse file tree 4 files changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ #include " EcsactDebugInfo.h"
2+ #include " EcsactUnreal/EcsactExecution.h"
3+ #include " EcsactUnreal/EcsactAsyncRunner.h"
4+
5+ auto UEcsactDebugInfo::GetAsyncTick (const UObject* WorldContext) -> int {
6+ auto runner = EcsactUnrealExecution::RunnerOrWarn (WorldContext->GetWorld ()).Get ();
7+ if (!runner) {
8+ return 0 ;
9+ }
10+
11+ auto async_runner = Cast<UEcsactAsyncRunner>(runner);
12+ if (!async_runner) {
13+ return 0 ;
14+ }
15+
16+ return async_runner->GetAsyncSessionTick ();
17+ }
Original file line number Diff line number Diff line change 1+ #pragma once
2+
3+ #include " CoreMinimal.h"
4+ #include " EcsactDebugInfo.generated.h"
5+
6+ UCLASS ()
7+
8+ class ECSACTUNREALFPS_API UEcsactDebugInfo : public UObject {
9+ GENERATED_BODY ()
10+ public:
11+ /* *
12+ * Get the tick of the current async runner (if there is one)
13+ */
14+ UFUNCTION (
15+ BlueprintCallable,
16+ Category = " Ecsact Net Unreal Example" ,
17+ Meta = (WorldContext = " WorldContext" )
18+ )
19+ static int GetAsyncTick (const UObject* WorldContext);
20+ };
You can’t perform that action at this time.
0 commit comments