diff --git a/Private/SourceCodeGenerator.cpp b/Private/SourceCodeGenerator.cpp index 4051572..685d211 100644 --- a/Private/SourceCodeGenerator.cpp +++ b/Private/SourceCodeGenerator.cpp @@ -343,22 +343,6 @@ bool FSourceCodeGeneratorModule::IsClassTypeSupported(const UClass* Class) bool FSourceCodeGeneratorModule::IsPropertyTypeSupported(const FProperty* Property) { - if (const auto ArrayProperty = CastField(Property)) - { - return IsPropertyTypeSupported(ArrayProperty->Inner); - } - - if (const auto SetProperty = CastField(Property)) - { - return IsPropertyTypeSupported(SetProperty->ElementProp); - } - - if (const auto MapProperty = CastField(Property)) - { - return IsPropertyTypeSupported(MapProperty->KeyProp) && - IsPropertyTypeSupported(MapProperty->ValueProp); - } - if (const auto ObjectProperty = CastField(Property)) { if (!IsClassTypeSupported(ObjectProperty->PropertyClass)) @@ -416,6 +400,22 @@ bool FSourceCodeGeneratorModule::IsPropertyTypeSupported(const FProperty* Proper } } + if (const auto ArrayProperty = CastField(Property)) + { + return IsPropertyTypeSupported(ArrayProperty->Inner); + } + + if (const auto SetProperty = CastField(Property)) + { + return IsPropertyTypeSupported(SetProperty->ElementProp); + } + + if (const auto MapProperty = CastField(Property)) + { + return IsPropertyTypeSupported(MapProperty->KeyProp) && + IsPropertyTypeSupported(MapProperty->ValueProp); + } + auto bIsBitField = false; if (const auto BoolProperty = CastField(Property)) @@ -851,6 +851,22 @@ void FSourceCodeGeneratorModule::GetDependencyClasses(const FProperty* Property, GetDependencyClasses(ArrayProperty->Inner, DependencyClasses); } } + else if (const auto SetProperty = CastField(Property)) + { + if (SetProperty->ElementProp != nullptr) + { + GetDependencyClasses(SetProperty->ElementProp, DependencyClasses); + } + } + else if (const auto MapProperty = CastField(Property)) + { + if (MapProperty->KeyProp != nullptr && MapProperty->ValueProp != nullptr) + { + GetDependencyClasses(MapProperty->KeyProp, DependencyClasses); + + GetDependencyClasses(MapProperty->ValueProp, DependencyClasses); + } + } } void FSourceCodeGeneratorModule::SaveIfChanged(const FString& FileName, const FString& String)