# CreateChildPropertiesGUI(VisualElement, SerializedProperty)

> Creates a field for each visible attribute of the UXML serialized data.

## Definition

* **Type:** Method
* **Namespace:** [Unity.UIToolkit.Editor](/engine/6000.7/script-reference/unity/uitoolkit/editor.md)
* **Assembly:** UnityEditor

```csharp
protected virtual void CreateChildPropertiesGUI(VisualElement container, SerializedProperty property)
```

### Parameters

**** (\[VisualElement]\(/engine/6000.7/script-reference/unityengine/uielements/visualelement)): The parent element to add the fields to.**** (\[SerializedProperty]\(/engine/6000.7/script-reference/unityeditor/serializedproperty)): The serialized property that represents the UXML serialized data instance.

### Remarks

The default implementation calls [UxmlSerializedDataPropertyDrawer.CreateChildPropertyGUI](/engine/6000.7/script-reference/unity/uitoolkit/editor/uxmlserializeddatapropertydrawer/createchildpropertygui.md) for each visible attribute, in declaration order. Override this method to show only specific attributes or to change their order. Call [UxmlSerializedDataPropertyDrawer.CreateChildPropertiesExcluding](/engine/6000.7/script-reference/unity/uitoolkit/editor/uxmlserializeddatapropertydrawer/createchildpropertiesexcluding.md) 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.

### Examples

```csharp
// 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");
    }
}
```
