using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; namespace MMO { public class MMOGuideInput : MMOGuideStep { public string InputStr => mInputStr; [SerializeField] InputField mIptUsername; private string mInputStr; private void Awake() { mIptUsername.onEndEdit.AddListener(OnInputEnd); } private void OnEnable() { mIptUsername.gameObject.SetActive(true); } private void OnInputEnd(string pStr) { mInputStr = mIptUsername.text.Replace(" ", ""); if (string.IsNullOrEmpty(mInputStr)) { MMOModule.Instance.ShowTip("Username can't be empty!"); return; } if (!string.IsNullOrEmpty(pStr)) { DelExcute?.Invoke(); } } } }