Class Vector2Field
Vector2 Field UI element.
Implements
INotifyValueChanged<Vector2>
Inherited Members
VisualElement.ExecuteDefaultAction(EventBase)
VisualElement.Focus()
VisualElement.Overlaps(Rect)
VisualElement.ToString()
VisualElement.GetFirstOfType<T>()
VisualElement.GetFirstAncestorOfType<T>()
VisualElement.canGrabFocus
VisualElement.focusController
VisualElement.cacheAsBitmap
CallbackEventHandler.RegisterCallback<TEventType>(EventCallback<TEventType>, TrickleDown)
CallbackEventHandler.RegisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TUserArgsType, TrickleDown)
CallbackEventHandler.UnregisterCallback<TEventType>(EventCallback<TEventType>, TrickleDown)
CallbackEventHandler.UnregisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TrickleDown)
Namespace: Unity.AppUI.UI
Assembly: Unity.AppUI.dll
Syntax
public class Vector2Field : BaseVisualElement, IEventHandler, IVisualElementScheduler, IExperimentalFeatures, ITransitionAnimations, ITransform, IResolvedStyle, IContextOverrideElement, IAdditionalDataHolder, IInputElement<Vector2>, IValidatableElement<Vector2>, ISizeableElement, INotifyValueChanging<Vector2>, INotifyValueChanged<Vector2>
Constructors
Vector2Field()
Default constructor.
Declaration
public Vector2Field()
Fields
containerUssClassName
The Vector2Field container styling class.
Declaration
public const string containerUssClassName = "appui-vector2field__container"
Field Value
Type | Description |
---|---|
string |
sizeUssClassName
The Vector2Field size styling class.
Declaration
public const string sizeUssClassName = "appui-vector2field--size-"
Field Value
Type | Description |
---|---|
string |
ussClassName
The Vector2Field main styling class.
Declaration
public const string ussClassName = "appui-vector2field"
Field Value
Type | Description |
---|---|
string |
xFieldUssClassName
The Vector2Field X NumericalField styling class.
Declaration
public const string xFieldUssClassName = "appui-vector2field__x-field"
Field Value
Type | Description |
---|---|
string |
yFieldUssClassName
The Vector2Field Y NumericalField styling class.
Declaration
public const string yFieldUssClassName = "appui-vector2field__y-field"
Field Value
Type | Description |
---|---|
string |
Properties
contentContainer
The content container of the Vector2Field.
Declaration
public override VisualElement contentContainer { get; }
Property Value
Type | Description |
---|---|
VisualElement |
Overrides
invalid
The invalid state of the Vector2Field.
Declaration
public bool invalid { get; set; }
Property Value
Type | Description |
---|---|
bool |
size
The size of the Vector2Field.
Declaration
public Size size { get; set; }
Property Value
Type | Description |
---|---|
Size |
validateValue
The validation function to use to validate the value.
Declaration
public Func<Vector2, bool> validateValue { get; set; }
Property Value
Type | Description |
---|---|
Func<Vector2, bool> |
value
The value of the Vector2Field.
Declaration
public Vector2 value { get; set; }
Property Value
Type | Description |
---|---|
Vector2 |
Methods
GetSizeUssClassName(Size)
Declaration
public static string GetSizeUssClassName(Size enumValue)
Parameters
Type | Name | Description |
---|---|---|
Size | enumValue |
Returns
Type | Description |
---|---|
string |
SetValueWithoutNotify(Vector2)
Set the value of the Vector2Field without notifying the change.
Declaration
public void SetValueWithoutNotify(Vector2 newValue)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | newValue | The new value of the Vector2Field. |
Implements
UnityEngine.UIElements.INotifyValueChanged<T>