On Scriptable Object Change#
Bindings / On Scriptable Object Change
Description#
Executes when the Scriptable Object 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 Scriptable Object Change")]
[Image(typeof(IconCubeOutline), ColorTheme.Type.Blue, typeof(BadgeLink))]
[Description("Executes when the Scriptable Object bound changes its value")]
[Category("Bindings/On Scriptable Object Change")]
[Keywords("Asset")]
[Serializable]
public class TriggerCoreBindScriptableObject : TriggerCoreBindBase
{
[SerializeField] private GetScriptableObject m_ScriptableObject = new GetScriptableObject();
// PROPERTIES: ----------------------------------------------------------------------------
protected override string GetTitle(GameObject source) => $"change {this.m_ScriptableObject}";
protected override ISubscription Subscription => this.m_ScriptableObject;
}
}