# UxmlEnumAttributeDescription<T>

> Describes a UXML attribute representing an enum as a string.

## Definition

* **Type:** Class
* **Namespace:** [UnityEngine.UIElements](/engine/6000.0/script-reference/unityengine/uielements.md)
* **Assembly:** UnityEngine.UIElementsModule
* **Inherits from:** [TypedUxmlAttributeDescription\<T>](/engine/6000.0/script-reference/unityengine/uielements/typeduxmlattributedescription1.md)

```csharp
public class UxmlEnumAttributeDescription<T> : TypedUxmlAttributeDescription<T> where T : struct, IConvertible
```

## Constructors

| Constructor                                                                                                                       | Description  |
| --------------------------------------------------------------------------------------------------------------------------------- | ------------ |
| [UxmlEnumAttributeDescription\`1()](/engine/6000.0/script-reference/unityengine/uielements/uxmlenumattributedescription1/ctor.md) | Constructor. |

## Properties

| Property                                                                                                                             | Description                                       |
| ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------- |
| [defaultValueAsString](/engine/6000.0/script-reference/unityengine/uielements/uxmlenumattributedescription1/defaultvalueasstring.md) | The default value for the attribute, as a string. |

## Methods

| Method                                                                                                                           | Description                                                                                                                   |
| -------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| [GetValueFromBag](/engine/6000.0/script-reference/unityengine/uielements/uxmlenumattributedescription1/getvaluefrombag.md)       | Retrieves the value of this attribute from the attribute bag. Returns the value if found; otherwise, it returns defaultValue. |
| [TryGetValueFromBag](/engine/6000.0/script-reference/unityengine/uielements/uxmlenumattributedescription1/trygetvaluefrombag.md) | Attempts to retrieve the value of this attribute from the attribute bag and returns true if found, otherwise false.           |

## Inheritance

**Inherited Members:**

* [TypedUxmlAttributeDescription\<T>.defaultValue](/engine/6000.0/script-reference/unityengine/uielements/typeduxmlattributedescription1/defaultvalue.md)
* [UxmlAttributeDescription.TryGetValueFromBag\<T>(IUxmlAttributes, CreationContext, Func\<string, T, T>, T, T)](/engine/6000.0/script-reference/unityengine/uielements/uxmlattributedescription/trygetvaluefrombag.md)
* [UxmlAttributeDescription.GetValueFromBag\<T>(IUxmlAttributes, CreationContext, Func\<string, T, T>, T)](/engine/6000.0/script-reference/unityengine/uielements/uxmlattributedescription/getvaluefrombag.md)
* [UxmlAttributeDescription.name](/engine/6000.0/script-reference/unityengine/uielements/uxmlattributedescription/name.md)
* [UxmlAttributeDescription.obsoleteNames](/engine/6000.0/script-reference/unityengine/uielements/uxmlattributedescription/obsoletenames.md)
* [UxmlAttributeDescription.type](/engine/6000.0/script-reference/unityengine/uielements/uxmlattributedescription/type.md)
* [UxmlAttributeDescription.typeNamespace](/engine/6000.0/script-reference/unityengine/uielements/uxmlattributedescription/typenamespace.md)
* [UxmlAttributeDescription.use](/engine/6000.0/script-reference/unityengine/uielements/uxmlattributedescription/use-1.md)
* [UxmlAttributeDescription.restriction](/engine/6000.0/script-reference/unityengine/uielements/uxmlattributedescription/restriction.md)
