Skip to content

Commit 3bae963

Browse files
committed
feat: expose connect functionality on async connect blueprint for derived classes
1 parent eb816bc commit 3bae963

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

Source/Ecsact/Public/EcsactUnreal/Blueprint/EcsactAsyncConnectBlueprintAction.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ auto UEcsactAsyncConnectBlueprintAction::AsyncConnect( //
1313
}
1414

1515
auto UEcsactAsyncConnectBlueprintAction::Activate() -> void {
16+
ConnectRequest(Utf8ConnectionString);
17+
}
18+
19+
auto UEcsactAsyncConnectBlueprintAction::ConnectRequest(
20+
std::string ConnectionString
21+
) -> void {
1622
UE_LOG(Ecsact, Warning, TEXT("AsyncConnectActivate()"));
1723
auto runner = EcsactUnrealExecution::Runner(GetWorld());
1824
auto async_events = Cast<IEcsactAsyncRunnerEvents>(runner);
@@ -28,7 +34,7 @@ auto UEcsactAsyncConnectBlueprintAction::Activate() -> void {
2834
return;
2935
}
3036

31-
auto req_id = ecsact_async_connect(Utf8ConnectionString.c_str());
37+
auto req_id = ecsact_async_connect(ConnectionString.c_str());
3238
UE_LOG(Ecsact, Warning, TEXT("async connect request id=%i"), req_id);
3339

3440
if(req_id == ECSACT_INVALID_ID(async_request)) {

Source/Ecsact/Public/EcsactUnreal/Blueprint/EcsactAsyncConnectBlueprintAction.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,7 @@ class ECSACT_API UEcsactAsyncConnectBlueprintAction
6868
FAsyncConnectDoneCallback OnError;
6969

7070
auto Activate() -> void override;
71+
72+
protected:
73+
auto ConnectRequest(std::string ConnectionString) -> void;
7174
};

0 commit comments

Comments
 (0)