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 Map#

Input / Disable Input Map

Description#

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

Parameters#

Name Description
Input Asset The Input Asset reference and Map

Code#

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

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

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

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