# UxmlTraits

> Describes a VisualElement derived class for the parsing of UXML files and the generation of UXML schema definition.

## Definition

* **Type:** Class
* **Namespace:** [UnityEngine.UIElements](/engine/6000.3/script-reference/unityengine/uielements.md)
* **Assembly:** UnityEngine.UIElementsModule
* **Inherits from:** [BaseUxmlTraits](/engine/6000.3/script-reference/unityengine/uielements/baseuxmltraits.md)

> **Warning:**
>
> **Deprecated.** UxmlTraits is deprecated and will be removed. Use UxmlElementAttribute instead.

```csharp
public abstract class UxmlTraits : BaseUxmlTraits
```

## Remarks

UxmlTraits describes the UXML attributes and children elements of a class deriving from [VisualElement](/engine/6000.3/script-reference/unityengine/uielements/visualelement.md). It is used by [BindableElement.UxmlFactory](/engine/6000.3/script-reference/unityengine/uielements/bindableelement/uxmlfactory.md) to map UXML attributes to the C# class properties when reading UXML documents. It is also used to generate UXML schema definitions.

## Methods

| Method                                                                            | Description                                                                                                                                                  |
| --------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [Init](/engine/6000.3/script-reference/unityengine/uielements/uxmltraits/init.md) | Initialize a [VisualElement](/engine/6000.3/script-reference/unityengine/uielements/visualelement.md) instance with values from the UXML element attributes. |

## Inheritance

**Inherited Members:**

* [BaseUxmlTraits.canHaveAnyAttribute](/engine/6000.3/script-reference/unityengine/uielements/baseuxmltraits/canhaveanyattribute.md)
* [BaseUxmlTraits.uxmlAttributesDescription](/engine/6000.3/script-reference/unityengine/uielements/baseuxmltraits/uxmlattributesdescription.md)
* [BaseUxmlTraits.uxmlChildElementsDescription](/engine/6000.3/script-reference/unityengine/uielements/baseuxmltraits/uxmlchildelementsdescription.md)
