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

Mouse Click Count#

Input / Mouse Click Count

  • Can Read

  • Cannot Write

Description#

Returns how many consecutive clicks the Mouse has registered

Code#

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

namespace VisualScript.Runtime
{
    [Get]

    [Title("Mouse Click Count")]
    [Category("Input/Mouse Click Count")]

    [Description("Returns how many consecutive clicks the Mouse has registered")]
    [Image(typeof(IconMouseDown), ColorTheme.Type.Blue, typeof(BadgeHash))]

    [Keywords("Cursor", "Double", "Triple", "Press", "Tap")]

    [Serializable]
    public class TypeNumberInputMouseClickCount : TypeNumber
    {
        public override double Get(Args args)
        {
            Mouse mouse = Mouse.current;
            return mouse != null ? mouse.clickCount.ReadValue() : 0d;
        }

        public override string ToString()
        {
            return "Mouse Click Count";
        }

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