public void OnDestroy()
 {
     // safeguard
     m_Control.UnlockKeyboard();
     m_Control.DeregisterUpdateAction(UpdateGUI);
     m_Control = null;
 }
Example #2
0
        public void InputFieldEndEdit(string text)
        {
            if ((Input.GetKeyDown(KeyCode.Return) || Input.GetKeyDown(KeyCode.KeypadEnter)) && m_Control != null && double.TryParse(text, out double value))
            {
                m_Control.UpdateValueAbs(value);
            }

            m_Control.TMProIsInteractable  = false;
            m_EditFieldButton.interactable = true;
            m_Control.UnlockKeyboard();
            UpdateGUI();
        }