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

Control Scheme#

Input / Control Scheme

  • Can Read

  • Cannot Write

Description#

The name of the control scheme the first player is currently using

Code#

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

namespace VisualScript.Runtime
{
    [Get]

    [Title("Control Scheme")]
    [Category("Input/Control Scheme")]

    [Description("The name of the control scheme the first player is currently using")]
    [Image(typeof(IconGamepad), ColorTheme.Type.Blue, typeof(BadgeString))]

    [Keywords("Player", "User", "Prompt", "Keyboard", "Gamepad")]

    [Serializable]
    public class TypeStringInputControlScheme : TypeString
    {
        public override string Get(Args args)
        {
            foreach (InputUser user in InputUser.all)
            {
                InputControlScheme? controlScheme = user.controlScheme;
                if (controlScheme.HasValue) return controlScheme.Value.name;
            }

            return string.Empty;
        }

        public override string ToString()
        {
            return "Control Scheme";
        }

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