Skip to content

Commit 48d31b6

Browse files
Merge pull request #582 from laishikai/master
修正默认参数收集导致的编译问题
2 parents 92b8f1f + 8e8c629 commit 48d31b6

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Plugins/UnLua/Source/UnLuaDefaultParamCollector/Private/UnLuaDefaultParamCollector.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,10 @@ class FUnLuaDefaultParamCollectorModule : public IScriptGeneratorPluginInterface
343343
else if (Property->IsA(FBoolProperty::StaticClass())) // boolean
344344
{
345345
PreAddProperty(Class, Function);
346-
GeneratedFileContent += FString::Printf(TEXT("PC->Parameters.Add(TEXT(\"%s\"), SharedBool_%s);\r\n"), *Property->GetName(), *ValueStr.ToUpper());
346+
if(ValueStr.IsEmpty())
347+
GeneratedFileContent += FString::Printf(TEXT("PC->Parameters.Add(TEXT(\"%s\"), SharedBool_FALSE);\r\n"), *Property->GetName());
348+
else
349+
GeneratedFileContent += FString::Printf(TEXT("PC->Parameters.Add(TEXT(\"%s\"), SharedBool_%s);\r\n"), *Property->GetName(), *ValueStr.ToUpper());
347350
}
348351
else if (Property->IsA(FNameProperty::StaticClass())) // FName
349352
{

0 commit comments

Comments
 (0)