GetValueFromBag<T>(IUxmlAttributes, CreationContext, Func<string, T, T>, T)
Get the attribute value from the attribute bag.
Read time 1 minuteLast updated 11 days ago
Definition
- Type: Method
- Namespace: UnityEngine.UIElements
- Assembly: UnityEngine.UIElementsModule
protected T GetValueFromBag<T>(IUxmlAttributes bag, CreationContext cc, Func<string, T, T> converterFunc, T defaultValue)
Parameters
A bag containing attributes and their values as strings.
The context in which the values are retrieved.
A function to convert a string value to type T.
Returns
Type | Description |
|---|---|
| T | The attribute value from the bag, or defaultValue if the attribute is not found. |
Remarks
The attribute is looked up using _name. If it is not found, each _obsoleteNames is tried in turn, from first to last.