diff --git a/Plugins/UnLua/Source/UnLua/Private/Registries/PropertyRegistry.cpp b/Plugins/UnLua/Source/UnLua/Private/Registries/PropertyRegistry.cpp index 58cdab1e..8901e733 100644 --- a/Plugins/UnLua/Source/UnLua/Private/Registries/PropertyRegistry.cpp +++ b/Plugins/UnLua/Source/UnLua/Private/Registries/PropertyRegistry.cpp @@ -105,22 +105,13 @@ namespace UnLua CPF_None, UECodeGen_Private::EPropertyGenFlags::Bool | UECodeGen_Private::EPropertyGenFlags::NativeBool, RF_Transient, -#if UE_VERSION_OLDER_THAN(5, 3, 0) - 1, -#endif + 1, nullptr, nullptr, -#if UE_VERSION_NEWER_THAN(5, 2, 1) - 1, -#endif sizeof(bool), sizeof(FPropertyCollector), nullptr, -#if UE_VERSION_NEWER_THAN(5, 2, 1) - METADATA_PARAMS(0, nullptr) -#else METADATA_PARAMS(nullptr, 0) -#endif }; const auto Property = new FBoolProperty(PropertyCollector, Params); #endif @@ -143,20 +134,11 @@ namespace UnLua CPF_HasGetValueTypeHash, UECodeGen_Private::EPropertyGenFlags::Int, RF_Transient, -#if UE_VERSION_OLDER_THAN(5, 3, 0) 1, -#endif nullptr, nullptr, -#if UE_VERSION_NEWER_THAN(5, 2, 1) - 1, -#endif 0, -#if UE_VERSION_NEWER_THAN(5, 2, 1) - METADATA_PARAMS(0, nullptr) -#else METADATA_PARAMS(nullptr, 0) -#endif }; const auto Property = new FIntProperty(PropertyCollector, Params); #endif @@ -179,20 +161,11 @@ namespace UnLua CPF_HasGetValueTypeHash, UECodeGen_Private::EPropertyGenFlags::Float, RF_Transient, -#if UE_VERSION_OLDER_THAN(5, 3, 0) 1, -#endif nullptr, nullptr, -#if UE_VERSION_NEWER_THAN(5, 2, 1) - 1, -#endif 0, -#if UE_VERSION_NEWER_THAN(5, 2, 1) - METADATA_PARAMS(0, nullptr) -#else METADATA_PARAMS(nullptr, 0) -#endif }; const auto Property = new FFloatProperty(PropertyCollector, Params); #endif @@ -215,20 +188,11 @@ namespace UnLua CPF_HasGetValueTypeHash, UECodeGen_Private::EPropertyGenFlags::Str, RF_Transient, -#if UE_VERSION_OLDER_THAN(5, 3, 0) 1, -#endif nullptr, nullptr, -#if UE_VERSION_NEWER_THAN(5, 2, 1) - 1, -#endif 0, -#if UE_VERSION_NEWER_THAN(5, 2, 1) - METADATA_PARAMS(0, nullptr) -#else METADATA_PARAMS(nullptr, 0) -#endif }; const auto Property = new FStrProperty(PropertyCollector, Params); #endif @@ -251,20 +215,11 @@ namespace UnLua CPF_HasGetValueTypeHash, UECodeGen_Private::EPropertyGenFlags::Name, RF_Transient, -#if UE_VERSION_OLDER_THAN(5, 3, 0) 1, -#endif nullptr, nullptr, -#if UE_VERSION_NEWER_THAN(5, 2, 1) - 1, -#endif 0, -#if UE_VERSION_NEWER_THAN(5, 2, 1) - METADATA_PARAMS(0, nullptr) -#else METADATA_PARAMS(nullptr, 0) -#endif }; const auto Property = new FNameProperty(PropertyCollector, Params); #endif @@ -287,22 +242,13 @@ namespace UnLua CPF_HasGetValueTypeHash, UECodeGen_Private::EPropertyGenFlags::Text, RF_Transient, -#if UE_VERSION_OLDER_THAN(5, 3, 0) 1, -#endif nullptr, nullptr, -#if UE_VERSION_NEWER_THAN(5, 2, 1) - 1, -#endif 0, -#if UE_VERSION_NEWER_THAN(5, 2, 1) - METADATA_PARAMS(0, nullptr) -#else METADATA_PARAMS(nullptr, 0) -#endif }; -#if UE_VERSION_NEWER_THAN(5, 2, 1) +#if UE_VERSION_NEWER_THAN(5, 2, 0) const auto Property = new FTextProperty(PropertyCollector, "", RF_Transient); #else const auto Property = new FTextProperty(PropertyCollector, Params); @@ -331,21 +277,12 @@ namespace UnLua CPF_HasGetValueTypeHash, UECodeGen_Private::EPropertyGenFlags::Object, RF_Transient, -#if UE_VERSION_OLDER_THAN(5, 3, 0) 1, -#endif nullptr, nullptr, -#if UE_VERSION_NEWER_THAN(5, 2, 1) - 1, -#endif 0, nullptr, -#if UE_VERSION_NEWER_THAN(5, 2, 1) - METADATA_PARAMS(0, nullptr) -#else METADATA_PARAMS(nullptr, 0) -#endif }; const auto ObjectProperty = new FObjectProperty(PropertyCollector, Params); ObjectProperty->PropertyClass = Class; @@ -366,21 +303,13 @@ namespace UnLua : CPF_HasGetValueTypeHash, UECodeGen_Private::EPropertyGenFlags::Struct, RF_Transient, -#if UE_VERSION_OLDER_THAN(5, 3, 0) 1, -#endif nullptr, nullptr, -#if UE_VERSION_NEWER_THAN(5, 2, 1) - 1, -#endif 0, nullptr, -#if UE_VERSION_NEWER_THAN(5, 2, 1) - METADATA_PARAMS(0, nullptr) -#else METADATA_PARAMS(nullptr, 0) -#endif + }; const auto StructProperty = new FStructProperty(PropertyCollector, Params); StructProperty->Struct = ScriptStruct;