On Color Change#
Bindings / On Color Change
Description#
Executes when the Color 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 Color Change")]
[Image(typeof(IconColor), ColorTheme.Type.Pink, typeof(BadgeLink))]
[Description("Executes when the Color bound changes its value")]
[Category("Bindings/On Color Change")]
[Serializable]
public class TriggerCoreBindColor : TriggerCoreBindBase
{
[SerializeField] private GetColor m_Color = new GetColor();
// PROPERTIES: ----------------------------------------------------------------------------
protected override string GetTitle(GameObject source) => $"change {this.m_Color}";
protected override ISubscription Subscription => this.m_Color;
}
}