Class ActionMapInput | Unity Reflect | 1.0.0-preview.11
docs.unity3d.com
    Show / Hide Table of Contents

    Class ActionMapInput

    Inheritance
    Object
    InputControlProvider
    ActionMapInput
    AnnotationInput
    LocomotionInput
    MainMenuInput
    ProxyAnimatorInput
    RadialMenuInput
    SelectionInput
    SpatialMenuInput
    Standard
    ToolsMenuInput
    TrackedObject
    TransformInput
    UIActions
    UndoMenuInput
    VacuumInput
    WorkspaceInput
    ReflectMainMenuInput
    Inherited Members
    InputControlProvider.controlDataList
    InputControlProvider.state
    InputControlProvider.SetControls(List<InputControlData>)
    InputControlProvider.GetControlData(Int32)
    InputControlProvider.controlCount
    InputControlProvider.Item[Int32]
    InputControlProvider.Item[String]
    InputControlProvider.SetControlNameOverride(Int32, String)
    InputControlProvider.lastEventTime
    Namespace: UnityEngine.InputNew
    Syntax
    public class ActionMapInput : InputControlProvider

    Constructors

    ActionMapInput(ActionMap)

    Declaration
    protected ActionMapInput(ActionMap actionMap)
    Parameters
    Type Name Description
    ActionMap actionMap

    Fields

    onStatusChange

    Declaration
    public static ActionMapInput.ChangeEvent onStatusChange
    Field Value
    Type Description
    ActionMapInput.ChangeEvent

    Properties

    actionMap

    Declaration
    public ActionMap actionMap { get; }
    Property Value
    Type Description
    ActionMap

    active

    Declaration
    public override bool active { get; set; }
    Property Value
    Type Description
    Boolean
    Overrides
    InputControlProvider.active

    autoReinitialize

    Control whether this ActionMapInput will attempt to reinitialize with applicable devices in order to process events

    Declaration
    public bool autoReinitialize { get; set; }
    Property Value
    Type Description
    Boolean

    blockSubsequent

    Declaration
    public bool blockSubsequent { get; set; }
    Property Value
    Type Description
    Boolean

    controlScheme

    Declaration
    public ControlScheme controlScheme { get; }
    Property Value
    Type Description
    ControlScheme

    resetOnActiveChanged

    Declaration
    public bool resetOnActiveChanged { get; set; }
    Property Value
    Type Description
    Boolean

    Methods

    BeginFrame()

    Declaration
    public void BeginFrame()

    BindControl(InputControlDescriptor, InputControl, Boolean)

    Declaration
    public bool BindControl(InputControlDescriptor descriptor, InputControl control, bool restrictToExistingDevices)
    Parameters
    Type Name Description
    InputControlDescriptor descriptor
    InputControl control
    Boolean restrictToExistingDevices
    Returns
    Type Description
    Boolean

    Create(ActionMap)

    Declaration
    public static ActionMapInput Create(ActionMap actionMap)
    Parameters
    Type Name Description
    ActionMap actionMap
    Returns
    Type Description
    ActionMapInput

    CurrentlyUsesDevice(InputDevice)

    Declaration
    public bool CurrentlyUsesDevice(InputDevice device)
    Parameters
    Type Name Description
    InputDevice device
    Returns
    Type Description
    Boolean

    EndFrame()

    Declaration
    public void EndFrame()

    GetCurrentlyUsedDevices()

    Declaration
    public List<InputDevice> GetCurrentlyUsedDevices()
    Returns
    Type Description
    List<InputDevice>

    GetPrimarySourceName(Int32, String)

    Declaration
    public override string GetPrimarySourceName(int controlIndex, string buttonAxisFormattingString = "{0} & {1}")
    Parameters
    Type Name Description
    Int32 controlIndex
    String buttonAxisFormattingString
    Returns
    Type Description
    String
    Overrides
    InputControlProvider.GetPrimarySourceName(Int32, String)

    ProcessEvent(InputEvent)

    Declaration
    public override bool ProcessEvent(InputEvent inputEvent)
    Parameters
    Type Name Description
    InputEvent inputEvent
    Returns
    Type Description
    Boolean
    Overrides
    InputControlProvider.ProcessEvent(InputEvent)

    Reset(Boolean)

    Declaration
    public void Reset(bool initToDeviceState = true)
    Parameters
    Type Name Description
    Boolean initToDeviceState

    ResetControl(InputControl)

    Reset controls that share the same source (potentially from another AMI)

    Declaration
    public void ResetControl(InputControl control)
    Parameters
    Type Name Description
    InputControl control

    RevertCustomizations()

    Declaration
    public void RevertCustomizations()

    TryInitializeWithDevices(IEnumerable<InputDevice>, IEnumerable<InputDevice>)

    Find the best control scheme for the available devices and initialize the action map input.

    It's important to note that an action map that can use either of two devices should have two of the same device listed in the control scheme. Otherwise, if the ActionMapInput is initialized with those two devices, the first device state found will override the other's device state. This becomes apparent when GetDeviceStateForDeviceSlot is called.

    Ex. Having a left and right VR controller where the action map can accept either controller's trigger button would cause issues if only one device was listed in the action map. Usually, this shows up as a ping-ponging issue where the ActionMapInput keeps getting re-initialized and binds different devices.

    Declaration
    public bool TryInitializeWithDevices(IEnumerable<InputDevice> availableDevices, IEnumerable<InputDevice> requiredDevices = null)
    Parameters
    Type Name Description
    IEnumerable<InputDevice> availableDevices

    Available devices in the system

    IEnumerable<InputDevice> requiredDevices
    Returns
    Type Description
    Boolean
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023