From 4b45be8d39cb915f1b041669ef3e1244527e2822 Mon Sep 17 00:00:00 2001 From: Jinger52035 <62539791+Jinger52035@users.noreply.github.com> Date: Thu, 11 Apr 2024 12:03:07 +0800 Subject: [PATCH] Update PropertyRegistry.cpp --- .../Private/Registries/PropertyRegistry.cpp | 77 +------------------ 1 file changed, 3 insertions(+), 74 deletions(-) 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;