﻿namespace JLGames.RocketDriver.Actions.Extensions
{
    public static class ExtUIToggle
    {
        public static void SetValue(this UnityEngine.UI.Toggle toggle, bool isOn, bool notify = false)
        {
            if (toggle.isOn == isOn) return;
            if (notify)
            {
                toggle.isOn = isOn;
            }
            else
            {
                toggle.SetIsOnWithoutNotify(isOn);
            }
        }
    }
}