public void Disable() { if (!IsValidInput) { return; } if (OnUnfocus != null) { OnUnfocus(InputField.text); OnUnfocus = null; } InputField.onEndEdit.RemoveAllListeners(); InputField.DeactivateInputField(); }
public void Enable(OnUnFocusDelegate unFocusCallback) { OnUnfocus = unFocusCallback; if (OnFocus != null) { OnFocus(); } InputField.onEndEdit.AddListener((string s) => Disable()); InputField.Select(); InputField.ActivateInputField(); InputField.onValueChanged.AddListener(ValueChangeCheck); }