Skip to content

Commit 6790693

Browse files
committed
fix: Fixed 5.3 compilation error due to SetActivityTimeout only being available in 5.4+
1 parent 43635c6 commit 6790693

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

NodeToCode.uplugin

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"FileVersion": 1,
3-
"Version": 0,
4-
"VersionName": "1.2.0",
3+
"Version": 1,
4+
"VersionName": "1.2.1",
55
"FriendlyName": "Node to Code",
66
"Description": "Quickly translate any Unreal Engine Blueprint to C++",
77
"Category": "Code Plugins",

Source/Private/LLM/N2CHttpHandlerBase.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,12 @@ void UN2CHttpHandlerBase::PostLLMRequest(
4545

4646
Request->SetContentAsString(Payload);
4747
Request->SetTimeout(RequestTimeout);
48-
Request->SetActivityTimeout(RequestTimeout);
4948

49+
// SetActivityTimeout is only available in UE5.4 and later
50+
#if ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 4
51+
Request->SetActivityTimeout(RequestTimeout);
52+
#endif
53+
5054
// Create a weak pointer to this for safety
5155
TWeakObjectPtr<UN2CHttpHandlerBase> WeakThis(this);
5256

0 commit comments

Comments
 (0)