Allow serialization of all generic types in scripts

This commit is contained in:
Simon Lübeß
2026-10-24 13:36:36 +02:00
parent ed94213435
commit 2674836cca
10 changed files with 262 additions and 33 deletions
+2 -9
View File
@@ -613,16 +613,9 @@ internal class EntityEditor
{
}
else if (fieldType.IsGenericType)
else if (fieldType.IsGenericType && fieldType.GetGenericTypeDefinition() == typeof(List<>))
{
if (fieldType.GetGenericTypeDefinition() == typeof(List<>))
{
newValue = ShowListEditor(fieldType, reference, fieldName);
}
else
{
ImGui.TextColored(new Vector4(1, 0, 0, 1), $"{fieldName}: Type {fieldType} is not implemented.");
}
newValue = ShowListEditor(fieldType, reference, fieldName);
}
else if (fieldType.IsArray)
{