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 Pointer over UI#

Input / Is Pointer over UI

  • Can Read

  • Cannot Write

Description#

Returns true if the pointer is currently on top of a user interface element

Code#

using System;
using UnityEngine.EventSystems;
using VisualScript.Icons;

namespace VisualScript.Runtime
{
    [Get]

    [Title("Is Pointer over UI")]
    [Category("Input/Is Pointer over UI")]

    [Description("Returns true if the pointer is currently on top of a user interface element")]
    [Image(typeof(IconUnityUI), ColorTheme.Type.Blue)]

    [Keywords("Cursor", "Mouse", "Touch", "Canvas", "Hover", "Blocked")]

    [Serializable]
    public class TypeBoolInputPointerOverUI : TypeBool
    {
        public override bool Get(Args args)
        {
            EventSystem eventSystem = EventSystem.current;
            return eventSystem != null && eventSystem.IsPointerOverGameObject();
        }

        public override string ToString()
        {
            return "Pointer over UI";
        }

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