logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    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
    object
    UnityNavigationDirectionReader
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.Ui.Infrastructure.Controllers
    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
    Type Description
    bool

    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
    Type Description
    Vector3
    In this article
    © 2026 Serenity. All Rights Reserved