# GetValueFromBag(IUxmlAttributes, CreationContext)

> Retrieves the value of this attribute from the attribute bag. Returns it if it is found, otherwise return null.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.UIElements](/engine/6000.0/script-reference/unityengine/uielements.md)
* **Assembly:** UnityEngine.UIElementsModule

```csharp
public override T GetValueFromBag(IUxmlAttributes bag, CreationContext cc)
```

### Parameters

**** (\[IUxmlAttributes]\(/engine/6000.0/script-reference/unityengine/uielements/iuxmlattributes)): The bag of attributes.**** (\[CreationContext]\(/engine/6000.0/script-reference/unityengine/uielements/creationcontext)): The context in which the values are retrieved.

### Returns

| Type | Description                 |
| ---- | --------------------------- |
| T    | The value of the attribute. |
