On Vector2 Change#
Bindings / On Vector2 Change
Description#
Executes when the Vector2 bound changes its value
Parameters#
| Name | Description |
|---|---|
| Initial Emit | Emits the event immediately when the component is enabled or not |
Code#
using System;
using UnityEngine;
using VisualScript.Icons;
namespace VisualScript.Runtime
{
[Title("On Vector2 Change")]
[Image(typeof(IconVector2), ColorTheme.Type.Lime, typeof(BadgeLink))]
[Description("Executes when the Vector2 bound changes its value")]
[Category("Bindings/On Vector2 Change")]
[Keywords("Position", "Direction", "2D")]
[Serializable]
public class TriggerCoreBindVector2 : TriggerCoreBindBase
{
[SerializeField] private GetVector2 m_Vector2 = new GetVector2();
// PROPERTIES: ----------------------------------------------------------------------------
protected override string GetTitle(GameObject source) => $"change {this.m_Vector2}";
protected override ISubscription Subscription => this.m_Vector2;
}
}