---
tags:
    - "Hover"
    - "Stay"
    - "Collider"
    - "Cursor"
    - "Pick"
    - "Touch"
---

# While Mouse Over

[Input](../index.md) / [Cursor](index.md) / **While Mouse Over**

## Description

Executed every frame the cursor hovers over the target collider

## Code

```cs
using System;
using UnityEngine;
using VisualScript.Icons;

namespace VisualScript.Runtime
{
    [Title("While Mouse Over")]
    [Image(typeof(IconCursor), ColorTheme.Type.Lime, typeof(BadgeCubeSolid))]

    [Description("Executed every frame the cursor hovers over the target collider")]
    [Category("Input/Cursor/While Mouse Over")]

    [Keywords("Hover", "Stay", "Collider", "Cursor", "Pick", "Touch")]

    [Serializable]
    public class TriggerCoreMouseOver : TriggerHandleSourceBase<HandleOnMouseOver>
    {
        // PROPERTIES: ----------------------------------------------------------------------------

        protected override string GetTitle(GameObject source) => $"Mouse Over {this.SourceName}";

        // OVERRIDE METHODS: ----------------------------------------------------------------------

        protected override void OnTrigger(GameObject target)
        {
            using Args args = Args.Get(this.Component, target);
            this.Run(args);
        }
    }
}
```

