BaseBoolField
A BaseBoolField is a clickable element that represents a boolean value.
Read time 7 minutesLast updated 2 days ago
Definition
- Type: Class
- Namespace: UnityEngine.UIElements
- Assembly: UnityEngine.UIElementsModule
- Inherits from: BaseField<bool>
- Implements: IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IBindable, INotifyValueChanged<bool>, IMixedValueSupport
public abstract class BaseBoolField : BaseField<bool>, IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IBindable, INotifyValueChanged<bool>, IMixedValueSupport
Constructors
Constructor | Description |
|---|---|
| BaseBoolField(System.String) | Creates a BaseBoolField with a Label and a default manipulator. |
Properties
Property | Description |
|---|---|
| text | Optional text that appears after the BaseBoolField. |
| toggleOnLabelClick | Whether to activate the toggle when the user clicks the label. |
Methods
Method | Description |
|---|---|
| InitLabel | Initializes the Label element whenever the BaseBoolField.text property changes. |
| SetValueWithoutNotify | Sets the value of the BaseBoolField, but does not notify the rest of the hierarchy of the change. |
| ToggleValue | Inverts the value property. |