---
tags:
    - "Input"
    - "Player"
    - "Controls"
    - "Map"
    - "Actions"
---

# Player Input Current Action Map

[Input](../index.md) / [Player Input](index.md) / **Player Input Current Action Map**

<div class="grid cards" markdown>

* :green_circle: Can Read

* :red_circle: Cannot Write

</div>

## Description

The name of the Input Action Map the Player Input is currently using

## Code

```cs
using System;
using UnityEngine;
using UnityEngine.InputSystem;
using VisualScript.Icons;

namespace VisualScript.Runtime
{
    [Get]

    [Title("Player Input Current Action Map")]
    [Category("Input/Player Input/Current Action Map")]

    [Description("The name of the Input Action Map the Player Input is currently using")]
    [Image(typeof(IconBoltOutline), ColorTheme.Type.Blue)]

    [Keywords("Input", "Player", "Controls", "Map", "Actions")]

    [Serializable]
    public class TypeStringPlayerInputCurrentActionMap : TypeString
    {
        [SerializeField] private GetGameObject m_PlayerInput = new GetGameObject(
            new GenTypeGameObject_PlayerInput()
        );

        public override string Get(Args args)
        {
            PlayerInput playerInput = this.m_PlayerInput.Get<PlayerInput>(args);
            if (playerInput == null) return string.Empty;

            InputActionMap actionMap = playerInput.currentActionMap;
            return actionMap != null ? actionMap.name : string.Empty;
        }

        public override string ToString()
        {
            return $"{this.m_PlayerInput} Current Action Map";
        }

        protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
    }
}
```

