TryGetValueFromBag<T>(IUxmlAttributes, CreationContext, Func<string, T, T>, T, ref T)
Tries to get the attribute value from the attribute bag.
阅读时间1 分钟最后更新于 1 个月前
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. |