using MalbersAnimations.Scriptables;
using UnityEngine;
public class Example : MonoBehaviour
{
public BoolReference myVar = new BoolReference();
}
using MalbersAnimations.Scriptables;
using UnityEngine;
public class Example : MonoBehaviour
{
public BoolReference myVar = new BoolReference();
private void OnEnable()
{
myVar.Variable.OnValueChanged += OnValueChanged;
}
private void OnDisable()
{
myVar.Variable.OnValueChanged += OnValueChanged;
}
private void OnValueChanged(bool value)
{
//listen to value changes here
}
}