GetPooled
Gets an event from the event pool and initializes it with the given values. Use this function instead of creating new events. Events obtained from this method should be released back to the pool using Dispose().
Read time 1 minuteLast updated 12 days ago
Definition
- Type: Method
- Namespace: UnityEngine.UIElements
- Assembly: UnityEngine.UIElementsModule
GetPooled(Vector2, EventModifiers)
Gets an event from the event pool and initializes it with the given values. Use this function instead of creating new events. Events obtained from this method should be released back to the pool using Dispose().
public static NavigationMoveEvent GetPooled(Vector2 moveVector, EventModifiers modifiers = EventModifiers.None)
Parameters
The move vector.
The modifier keys held down during the event.
Returns
Type | Description |
|---|---|
| NavigationMoveEvent | An initialized navigation event. |
GetPooled(Direction, EventModifiers)
Gets an event from the event pool and initializes it with the given values. Use this function instead of creating new events. Events obtained from this method should be released back to the pool using Dispose().
public static NavigationMoveEvent GetPooled(NavigationMoveEvent.Direction direction, EventModifiers modifiers = EventModifiers.None)
Parameters
The logical direction of the navigation.
The modifier keys held down during the event.
Returns
Type | Description |
|---|---|
| NavigationMoveEvent | An initialized navigation event. |
Remarks
This method doesn't set any move vector. See other overload of the method for more information.