diff --git a/Runtime/UXComponent/UX/UXButton.cs b/Runtime/UXComponent/UX/UXButton.cs index 2a61122..656c825 100644 --- a/Runtime/UXComponent/UX/UXButton.cs +++ b/Runtime/UXComponent/UX/UXButton.cs @@ -258,6 +258,18 @@ public class UXButton : UIBehaviour, IButton, _resetRoutine = StartCoroutine(OnFinishSubmit()); } + public bool Disable + { + get => m_Interactable; + set + { + if (m_Interactable == value) return; + m_Interactable = value; + m_SelectionState = !m_Interactable ? SelectionState.Disabled : SelectionState.Normal; + UpdateVisualState(m_SelectionState, false); + } + } + #endregion #region Public Methods