using UnityEngine; using UnityEngine.UI; using UnityEngine.Events; namespace Michsky.UI.Shift { public class SwitchManager : MonoBehaviour { [Header("Settings")] [Tooltip("Each switch must have a different tag")] public string switchTag = "Switch"; public bool isOn = true; public bool saveValue = true; public bool invokeAtStart = true; [Header("Events")] public UnityEvent OnEvents; public UnityEvent OffEvents; [HideInInspector] public Animator switchAnimator; Button switchButton; void OnEnable() { if (switchAnimator == null) { switchAnimator = gameObject.GetComponent(); } if (switchButton == null) { switchButton = gameObject.GetComponent