From a819f6caa7ce8ba34f9430a55be95e4fbb953fce Mon Sep 17 00:00:00 2001 From: Edenlia Date: Thu, 9 Jul 2026 10:51:43 +0800 Subject: [PATCH 1/3] Fix UE5.8 compile error because of the deprecate of TMulticastScriptDelegate::ProcessMulticastDelegate --- unreal/Puerts/Source/JsEnv/Private/JsEnvImpl.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/unreal/Puerts/Source/JsEnv/Private/JsEnvImpl.cpp b/unreal/Puerts/Source/JsEnv/Private/JsEnvImpl.cpp index 6366704af9..c3573f5b39 100644 --- a/unreal/Puerts/Source/JsEnv/Private/JsEnvImpl.cpp +++ b/unreal/Puerts/Source/JsEnv/Private/JsEnvImpl.cpp @@ -2434,9 +2434,15 @@ void FJsEnvImpl::ExecuteDelegate( } else { +#if ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 8 + JsCallbackPrototypeMap[SignatureFunction]->Call(Isolate, Context, Info, + [MulticastScriptDelegate = static_cast(DelegatePtr)](void* Params) + { MulticastScriptDelegate->ProcessDelegate(Params); }); +#else JsCallbackPrototypeMap[SignatureFunction]->Call(Isolate, Context, Info, [MulticastScriptDelegate = static_cast(DelegatePtr)](void* Params) { MulticastScriptDelegate->ProcessMulticastDelegate(Params); }); +#endif } } From 656f83f2437760fe281fdda78cf0744940e15717 Mon Sep 17 00:00:00 2001 From: Edenlia Date: Thu, 9 Jul 2026 15:12:08 +0800 Subject: [PATCH 2/3] Fix UE5.8 compile error, make it cleaner --- unreal/Puerts/Source/JsEnv/Private/JsEnvImpl.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/unreal/Puerts/Source/JsEnv/Private/JsEnvImpl.cpp b/unreal/Puerts/Source/JsEnv/Private/JsEnvImpl.cpp index c3573f5b39..8b98776419 100644 --- a/unreal/Puerts/Source/JsEnv/Private/JsEnvImpl.cpp +++ b/unreal/Puerts/Source/JsEnv/Private/JsEnvImpl.cpp @@ -2434,15 +2434,15 @@ void FJsEnvImpl::ExecuteDelegate( } else { -#if ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 8 JsCallbackPrototypeMap[SignatureFunction]->Call(Isolate, Context, Info, [MulticastScriptDelegate = static_cast(DelegatePtr)](void* Params) - { MulticastScriptDelegate->ProcessDelegate(Params); }); + { +#if ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 8 + MulticastScriptDelegate->ProcessDelegate(Params); #else - JsCallbackPrototypeMap[SignatureFunction]->Call(Isolate, Context, Info, - [MulticastScriptDelegate = static_cast(DelegatePtr)](void* Params) - { MulticastScriptDelegate->ProcessMulticastDelegate(Params); }); + MulticastScriptDelegate->ProcessMulticastDelegate(Params); #endif + }); } } From 508d6aaacc858f259f087f8a0d9ad25c0415ca7e Mon Sep 17 00:00:00 2001 From: Edenlia Date: Thu, 9 Jul 2026 15:59:27 +0800 Subject: [PATCH 3/3] Fix clang-format error --- unreal/Puerts/Source/JsEnv/Private/JsEnvImpl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unreal/Puerts/Source/JsEnv/Private/JsEnvImpl.cpp b/unreal/Puerts/Source/JsEnv/Private/JsEnvImpl.cpp index 8b98776419..33b6c133bc 100644 --- a/unreal/Puerts/Source/JsEnv/Private/JsEnvImpl.cpp +++ b/unreal/Puerts/Source/JsEnv/Private/JsEnvImpl.cpp @@ -2442,7 +2442,7 @@ void FJsEnvImpl::ExecuteDelegate( #else MulticastScriptDelegate->ProcessMulticastDelegate(Params); #endif - }); + }); } }