From e0a0271ccc1f43ba42625f3df4913b5250d4118f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A3=AE=E9=9B=A8Plus?= Date: Fri, 27 Dec 2024 18:37:06 +0800 Subject: [PATCH] =?UTF-8?q?[unreal]=E4=BF=AE=E5=A4=8D=E9=9D=99=E6=80=81?= =?UTF-8?q?=E7=BB=91=E5=AE=9A:=20=E8=8B=A5=E7=BB=93=E6=9E=84=E4=BD=93?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E7=BB=91=E5=AE=9A=E6=9E=84=E9=80=A0=E5=87=BD?= =?UTF-8?q?=E6=95=B0=E5=88=99=E4=B8=8D=E4=BC=9A=E7=94=9F=E6=88=90=E6=9E=84?= =?UTF-8?q?=E9=80=A0=E5=87=BD=E6=95=B0=E5=AE=9A=E4=B9=89=20(#1951)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: morirain --- .../DeclarationGenerator/Private/DeclarationGenerator.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/unreal/Puerts/Source/DeclarationGenerator/Private/DeclarationGenerator.cpp b/unreal/Puerts/Source/DeclarationGenerator/Private/DeclarationGenerator.cpp index 28a419ff00..2ba7af634b 100644 --- a/unreal/Puerts/Source/DeclarationGenerator/Private/DeclarationGenerator.cpp +++ b/unreal/Puerts/Source/DeclarationGenerator/Private/DeclarationGenerator.cpp @@ -1404,7 +1404,8 @@ void FTypeScriptDeclarationGenerator::GenStruct(UStruct* Struct) auto GenConstrutor = [&]() { auto ClassDefinition = PUERTS_NAMESPACE::FindClassByType(Struct); - if (ClassDefinition && ClassDefinition->ConstructorInfos) + if (ClassDefinition && ClassDefinition->ConstructorInfos && ClassDefinition->ConstructorInfos->Name && + ClassDefinition->ConstructorInfos->Type) { PUERTS_NAMESPACE::NamedFunctionInfo* ConstructorInfo = ClassDefinition->ConstructorInfos; while (ConstructorInfo && ConstructorInfo->Name && ConstructorInfo->Type)