# UxmlStringAttributeDescription

> Describes a UXML string attribute.

## Definition

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

```csharp
public class UxmlStringAttributeDescription : TypedUxmlAttributeDescription<string>
```

## Constructors

| Constructor                                                                                                                       | Description  |
| --------------------------------------------------------------------------------------------------------------------------------- | ------------ |
| [UxmlStringAttributeDescription()](/engine/6000.0/script-reference/unityengine/uielements/uxmlstringattributedescription/ctor.md) | Constructor. |

## Properties

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

## Methods

| Method                                                                                                                            | Description                                                                                                                   |
| --------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| [GetValueFromBag](/engine/6000.0/script-reference/unityengine/uielements/uxmlstringattributedescription/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/uxmlstringattributedescription/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\<string>.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)
