Fix GetDependencyClasses For Set and Map
This commit is contained in:
1 parent
969682bc95
commit
5c3d42462f
2 files changed
+30
-7
No files matched your search
@@ -72,3 +72,5 @@ Plugins/**/Intermediate/*
|
||||
|
||||
# Cache files for the editor to use
|
||||
DerivedDataCache/*
|
||||
|
||||
obj/*
|
||||
+28
-7
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user