Skip to content

Commit

Permalink
[unreal]ue5.5 cpp代码编译错误
Browse files Browse the repository at this point in the history
  • Loading branch information
chexiongsheng committed Nov 19, 2024
1 parent 84b1c07 commit 3f5572d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions unreal/Puerts/Source/JsEnv/Private/ContainerMeta.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,12 @@ PropertyMacro* FContainerMeta::GetObjectProperty(UField* Field)
if (Enum->GetCppForm() == UEnum::ECppForm::EnumClass)
{
FEnumProperty* EnumProp =
#if ENGINE_MAJOR_VERSION > 4 && ENGINE_MINOR_VERSION > 4 // 5.5+
new FEnumProperty(PropertyMetaRoot, NAME_None, RF_Transient);
EnumProp->SetEnum(Enum);
#else
new FEnumProperty(PropertyMetaRoot, NAME_None, RF_Transient, 0, CPF_HasGetValueTypeHash, Enum);
#endif
FNumericProperty* UnderlyingProp = new FByteProperty(EnumProp, TEXT("UnderlyingType"), RF_Transient);
EnumProp->AddCppProperty(UnderlyingProp);
EnumProp->ElementSize = UnderlyingProp->ElementSize;
Expand Down

0 comments on commit 3f5572d

Please sign in to comment.