Skip to content

Commit 484a717

Browse files
committed
feat: add debug info widget on mass level
1 parent 87675fb commit 484a717

File tree

4 files changed

+37
-0
lines changed

4 files changed

+37
-0
lines changed
37.9 KB
Binary file not shown.
6.14 KB
Binary file not shown.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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+
};

0 commit comments

Comments
 (0)