docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct MyPlayerControls.GameplayActions

    Accessor struct for the actions in the "gameplay" action map.

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    Namespace: DocCodeSamples.Tests
    Assembly: Unity.InputSystem.DocCodeSamples.dll
    Syntax
    public struct MyPlayerControls.GameplayActions

    Constructors

    GameplayActions(MyPlayerControls)

    Constructs the accessor for the given wrapper.

    Declaration
    public GameplayActions(MyPlayerControls wrapper)
    Parameters
    Type Name Description
    MyPlayerControls wrapper

    The MyPlayerControls instance to wrap.

    Properties

    enabled

    Whether the "gameplay" action map is currently enabled.

    Declaration
    public bool enabled { get; }
    Property Value
    Type Description
    bool

    move

    The "move" action.

    Declaration
    public InputAction move { get; }
    Property Value
    Type Description
    InputAction

    use

    The "use" action.

    Declaration
    public InputAction use { get; }
    Property Value
    Type Description
    InputAction

    Methods

    Disable()

    Disables the "gameplay" action map.

    Declaration
    public void Disable()

    Enable()

    Enables the "gameplay" action map.

    Declaration
    public void Enable()

    Get()

    Returns the underlying "gameplay" action map.

    Declaration
    public InputActionMap Get()
    Returns
    Type Description
    InputActionMap

    The underlying action map.

    SetCallbacks(IGameplayActions)

    Registers instance to receive callbacks for the actions in the "gameplay" action map, replacing any previously registered instance.

    Declaration
    public void SetCallbacks(MyPlayerControls.IGameplayActions instance)
    Parameters
    Type Name Description
    MyPlayerControls.IGameplayActions instance

    Instance to register, or null to only unregister the current one.

    Operators

    implicit operator InputActionMap(GameplayActions)

    Implicitly converts to the underlying action map.

    Declaration
    public static implicit operator InputActionMap(MyPlayerControls.GameplayActions set)
    Parameters
    Type Name Description
    MyPlayerControls.GameplayActions set

    Accessor to convert.

    Returns
    Type Description
    InputActionMap

    The underlying "gameplay" action map.

    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)