Class UnityNavigationDirectionReader
Reads a navigation direction from a navigate action, whichever composite it is bound through: the Input
System's own UI map navigates with a 2D Vector, Serenity's Menu map with a 3D Vector. A project may point its
player input settings at either, so the direction is read as the value type the action actually produces.
Inheritance
UnityNavigationDirectionReader
Assembly: Serenity.UnityUi.Infrastructure.dll
Syntax
public static class UnityNavigationDirectionReader
Methods
CanRead(Type)
Whether a navigate action producing valueType can be read as a direction.
Declaration
public static bool CanRead(Type valueType)
Parameters
| Type |
Name |
Description |
| Type |
valueType |
|
Returns
Read(CallbackContext)
The direction the action reported, with no depth for a two-dimensional one.
Declaration
public static Vector3 Read(InputAction.CallbackContext context)
Parameters
| Type |
Name |
Description |
| CallbackContext |
context |
|
Returns