diff --git a/.gitignore b/.gitignore index 6e0d95f..bf8543c 100644 --- a/.gitignore +++ b/.gitignore @@ -72,3 +72,5 @@ Plugins/**/Intermediate/* # Cache files for the editor to use DerivedDataCache/* + +obj/* diff --git a/SourceCodeGenerator.cs b/SourceCodeGenerator.cs index ca398f6..61e18c3 100644 --- a/SourceCodeGenerator.cs +++ b/SourceCodeGenerator.cs @@ -267,11 +267,6 @@ namespace SourceCodeGeneratorUbtPlugin private static bool IsPropertyTypeSupported(UhtProperty property) { - if (property is UhtArrayProperty arrayProperty) - { - return IsPropertyTypeSupported(arrayProperty.ValueProperty); - } - if (property is UhtObjectProperty objectProperty) { if (!IsClassTypeSupported(objectProperty.Class)) @@ -306,6 +301,22 @@ namespace SourceCodeGeneratorUbtPlugin return false; } + if (property is UhtArrayProperty arrayProperty) + { + return IsPropertyTypeSupported(arrayProperty.ValueProperty); + } + + if (property is UhtSetProperty setProperty) + { + return IsPropertyTypeSupported(setProperty.ValueProperty); + } + + if (property is UhtMapProperty mapProperty) + { + return IsPropertyTypeSupported(mapProperty.KeyProperty) && + IsPropertyTypeSupported(mapProperty.ValueProperty); + } + return property is { IsBitfield: false, IsStaticArray: false }; } @@ -471,9 +482,19 @@ namespace SourceCodeGeneratorUbtPlugin { DependencyClasses.Add(softObjectProperty.Class); } - else if (property is UhtArrayProperty { ValueProperty: UhtObjectProperty valueProperty }) + else if (property is UhtArrayProperty arrayProperty) { - DependencyClasses.Add(valueProperty.Class); + GetDependencyClasses(arrayProperty.ValueProperty, DependencyClasses); + } + else if (property is UhtSetProperty setProperty) + { + GetDependencyClasses(setProperty.ValueProperty, DependencyClasses); + } + else if (property is UhtMapProperty mapProperty) + { + GetDependencyClasses(mapProperty.KeyProperty, DependencyClasses); + + GetDependencyClasses(mapProperty.ValueProperty, DependencyClasses); } }