| Parameter | Description |
|---|---|
| container | The parent element to add the fields to. |
| property | The serialized property that represents the UXML serialized data instance. |
Creates a field for each visible attribute of the UXML serialized data.
The default implementation calls UxmlSerializedDataPropertyDrawer.CreateChildPropertyGUI for each visible attribute,
in declaration order. Override this method to show only specific attributes or to change their order.
Call UxmlSerializedDataPropertyDrawer.CreateChildPropertiesExcluding to exclude specific attributes by name whilst keeping the default order and property drawers for the rest.
The following example shows only specific attributes by name.
// Override CreateChildPropertiesGUI to display only specific properties. [CustomPropertyDrawer(typeof(SelectiveButton.UxmlSerializedData))] public class SelectiveButtonDrawer : UxmlSerializedDataPropertyDrawer { protected override void CreateChildPropertiesGUI(VisualElement container, SerializedProperty property) { CreateChildPropertiesIncluding(container, property, "color", "text"); } }