GetNextFocusable(Focusable, FocusChangeDirection)
Get the next element in the given direction.
Read time 1 minuteLast updated 10 days ago
Definition
- Type: Method
- Namespace: UnityEngine.UIElements
- Assembly: UnityEngine.UIElementsModule
Focusable GetNextFocusable(Focusable currentFocusable, FocusChangeDirection direction)
Parameters
Returns
Type | Description |
|---|---|
| Focusable |
Remarks
For example, in a VisualElementFocusRing, the next element in the _right by default is the element to the right of the current element. More precisely, the next element is the focusable element whose _tabIndex is the closest to the current element in increasing order. If no such element is found, the process wraps around and continues looking for a focusable element starting at tabIndex=0 and proceeding in increasing order.
When the EventDispatcher processes navigation and pointer events, it automatically calls this method to generate Focus events.
The Focus event's _target matches the value returned by this method to generate it.