On Mouse Exit#
Input / Cursor / On Mouse Exit
Description#
Executed when the cursor exits the target collider
Code#
using System;
using UnityEngine;
using VisualScript.Icons;
namespace VisualScript.Runtime
{
[Title("On Mouse Exit")]
[Image(typeof(IconMouse), ColorTheme.Type.Lime, typeof(BadgeCubeOutline))]
[Description("Executed when the cursor exits the target collider")]
[Category("Input/Cursor/On Mouse Exit")]
[Keywords("Hover", "Out", "Leave", "Collider", "Cursor", "Pick", "Touch")]
[Serializable]
public class TriggerCoreMouseExit : TriggerHandleSourceBase<HandleOnMouseExit>
{
// PROPERTIES: ----------------------------------------------------------------------------
protected override string GetTitle(GameObject source) => $"{this.SourceName} Mouse Exit";
// OVERRIDE METHODS: ----------------------------------------------------------------------
protected override void OnTrigger(GameObject target)
{
using Args args = Args.Get(this.Component, target);
this.Run(args);
}
}
}