decorator
The decorator that draws the override indicator bar, binding affordances, and context menu for this field.
阅读时间1 分钟最后更新于 2 个月前
Definition
- Type: Property
- Namespace: Unity.UIToolkit.Editor
- Assembly: UnityEditor
public UxmlAttributeFieldDecorator decorator { get; }
Remarks
Additional Resources: UxmlAttributeFieldDecorator
The following example reaches the decorator to add an action button next to the field.
Examples
var field = new UxmlAttributeField(property.FindPropertyRelative("text"));field.decorator.Add(new Button(() => field.label = "Text Content") { text = "Reset label" });container.Add(field);