Fix [AssetReference(typeof(typeName)] not working for arrays of assets (fix for collection types)

This commit is contained in:
Wojtek Figat
2022-07-23 16:36:21 +02:00
parent a590336118
commit 32fe383c10
2 changed files with 14 additions and 3 deletions

View File

@@ -184,7 +184,7 @@ namespace FlaxEditor.CustomEditors.Editors
var overrideEditor = overrideEditorType != null ? (CustomEditor)Activator.CreateInstance(overrideEditorType) : null;
var property = panel.AddPropertyItem(new CollectionItemLabel(this, i));
var itemLayout = useSharedLayout ? (LayoutElementsContainer)property : property.VerticalPanel();
itemLayout.Object(new ListValueContainer(elementType, i, Values), overrideEditor);
itemLayout.Object(new ListValueContainer(elementType, i, Values, attributes), overrideEditor);
}
}
else
@@ -202,7 +202,7 @@ namespace FlaxEditor.CustomEditors.Editors
var overrideEditor = overrideEditorType != null ? (CustomEditor)Activator.CreateInstance(overrideEditorType) : null;
var property = panel.AddPropertyItem("Element " + i);
var itemLayout = useSharedLayout ? (LayoutElementsContainer)property : property.VerticalPanel();
itemLayout.Object(new ListValueContainer(elementType, i, Values), overrideEditor);
itemLayout.Object(new ListValueContainer(elementType, i, Values, attributes), overrideEditor);
}
}
}