GetFocusChangeDirection(Focusable, EventBase)
Get the direction of the focus change for the given event.
Read time 1 minuteLast updated 13 days ago
Definition
- Type: Method
- Namespace: UnityEngine.UIElements
- Assembly: UnityEngine.UIElementsModule
FocusChangeDirection GetFocusChangeDirection(Focusable currentFocusable, EventBase e)
Parameters
Returns
Type | Description |
|---|---|
| FocusChangeDirection |
Remarks
For example, in a VisualElementFocusRing, when the Tab key is pressed, the focus change direction should be VisualElementFocusChangeDirection.right.
When the EventDispatcher processes navigation and pointer events, it automatically calls this method to generate Focus events.
The Focus event's IFocusEvent.direction matches the value returned by this method to generate it.