Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


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

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

moveVector

The move vector.

The modifier keys held down during the event.

Returns

Type

Description

NavigationMoveEventAn 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

direction

The logical direction of the navigation.

The modifier keys held down during the event.

Returns

Type

Description

NavigationMoveEventAn initialized navigation event.

Remarks

This method doesn't set any move vector. See other overload of the method for more information.