Documentation index for AI agents (llms.txt) A Markdown version of every page is available: request the page's source under /docs/, follow the "alternate" link in this page's head, or start from /llms.txt.
Visual Script logo Manual

Is Input Action Enabled#

Input / Is Input Action Enabled

  • Can Read

  • Cannot Write

Description#

Returns true if the specified Input Action is currently listening to input

Code#

using System;
using UnityEngine;
using VisualScript.Icons;

namespace VisualScript.Runtime
{
    [Get]

    [Title("Is Input Action Enabled")]
    [Category("Input/Is Input Action Enabled")]

    [Description("Returns true if the specified Input Action is currently listening to input")]
    [Image(typeof(IconBoltOutline), ColorTheme.Type.Teal, typeof(BadgeTick))]

    [Keywords("Active", "On", "Off", "Disabled", "Map")]

    [Serializable]
    public class TypeBoolInputActionEnabled : TypeBool
    {
        [SerializeField] private InputActionFromAsset m_InputAction = new InputActionFromAsset();

        public override bool Get(Args args)
        {
            UnityEngine.InputSystem.InputAction inputAction = this.m_InputAction.InputAction;
            return inputAction?.enabled ?? false;
        }

        public override string ToString()
        {
            return $"{this.m_InputAction} is Enabled";
        }

        protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
    }
}
Visual Script logoVisual Script © Catsoft Works 2026. All rights reserved.