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

Disable Input Action#

Input / Disable Input Action

Description#

Disables an Input Action asset with an Action value which allows reading user input

Parameters#

Name Description
Input Asset The Input Asset reference and Action name

Code#

using System;
using UnityEngine;
using VisualScript.Icons;

namespace VisualScript.Runtime
{
    [Title("Disable Input Action")]
    [Image(typeof(IconBoltOutline), ColorTheme.Type.TextLight)]
    
    [Description("Disables an Input Action asset with an Action value which allows reading user input")]
    [Category("Input/Disable Input Action")]
    
    [Parameter("Input Asset", "The Input Asset reference and Action name")]
    
    [Keywords("Deactivate", "Inactive")]
    
    [Serializable]
    public class InstructionCoreInputDisableAction : Instruction
    {
        [SerializeField] private InputActionFromAsset m_InputAsset = new InputActionFromAsset();

        protected override string GetTitle(GameObject source)
        {
            string input = TextUtils.ThemeAsConstant(this.m_InputAsset.ToString());
            return $"Disable {input}";
        }

        protected override Awaitable Run(Args args)
        {
            UnityEngine.InputSystem.InputAction inputAction = this.m_InputAsset.InputAction;
            if (inputAction is { enabled: true }) inputAction.Disable();
            
            return Done;
        }
    }
}
Visual Script logoVisual Script © Catsoft Works 2026. All rights reserved.