PropertyField
A SerializedProperty wrapper VisualElement that, on Bind(), will generate the correct field elements with the correct binding paths. For more information, refer to UXML element PropertyField.
Read time 8 minutesLast updated 9 days ago
Definition
- Type: Class
- Namespace: UnityEditor.UIElements
- Assembly: UnityEditor.CoreModule
- Inherits from: VisualElement
- Implements: IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, ICustomStyle, IBindable
[UxmlElement(visibility = LibraryVisibility.Visible)][Icon("UIToolkit/Icons/PropertyField.png")]public class PropertyField : VisualElement, IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, ICustomStyle, IBindable
Static Fields
Value | Description |
|---|---|
| inputUssClassName | USS class name of input elements in elements of this type. |
| inspectorElementUssClassName | USS class name of property fields in inspector elements |
| labelUssClassName | USS class name of labels in elements of this type. |
| ussClassName | USS class name of elements of this type. |
Constructors
Constructor | Description |
|---|---|
| PropertyField() | PropertyField constructor. |
| PropertyField(UnityEditor.SerializedProperty) | PropertyField constructor. |
| PropertyField(UnityEditor.SerializedProperty,System.String) | PropertyField constructor. |
Properties
Property | Description |
|---|---|
| binding | Binding object that will be updated. |
| bindingPath | Path of the target property to be bound. |
| label | Optionally overwrite the label of the generate property field. If no label is provided the string will be taken from the SerializedProperty. |
Methods
Method | Description |
|---|---|
| RegisterValueChangeCallback | Registers this callback to receive SerializedPropertyChangeEvent when a value is changed. |