TryGetValueFromBag<T>(IUxmlAttributes, CreationContext, Func<string, T, T>, T, ref T)
Tries to get the attribute value from the attribute bag.
Read time 1 minuteLast updated 4 days ago
Definition
- Type: Method
- Namespace: UnityEngine.UIElements
- Assembly: UnityEngine.UIElementsModule
TryGetValueFromBag<T>(IUxmlAttributes, CreationContext, Func<string, T, T>, T, T)
protected bool TryGetValueFromBag<T>(IUxmlAttributes bag, CreationContext cc, Func<string, T, T> converterFunc, T defaultValue, ref T value)
Parameters
A bag contains 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 |
|---|---|
| bool | True if the value is found, false otherwise. |