using Framework.Manager; using System.Collections; using System.Collections.Generic; using TMPro; using UnityEngine; using UnityEngine.UI; public class ELP_Selectmessage : MonoBehaviour { public InputField inputField_; public TMP_InputField inputField; public TextMeshProUGUI textMesh; public Button select; public GameObject Panel; public bool islikenext; bool inits = false; void Start() { if (transform.name == "需求单位Panel"|| transform.name == "收货地址Panel") { transform.GetComponent().enabled = false; } if (select != null && Panel != null) { select.onClick.AddListener(() => { if (inputField.text != "" && textMesh.text.Contains(inputField.text) || textMesh.text.Equals(inputField.text)) { Panel.SetActive(true); } else { Panel.SetActive(false); } }); } } // Update is called once per frame void Update() { if (select == null && Panel != null) { if (inputField.text != "" && textMesh.text.Contains(inputField.text) || textMesh.text.Equals(inputField.text)) { Panel.SetActive(true); } else { Panel.SetActive(false); } } if (islikenext && !inits) { if (inputField != null) { if (inputField.text != "" && textMesh.text.Contains(inputField.text) || textMesh.text.Equals(inputField.text)) { TutorialGuideManager.Instance.TriggerNextGuide(); inits = true; } } else { if (inputField_.text != "" && textMesh.text.Equals(inputField_.text)) { TutorialGuideManager.Instance.TriggerNextGuide(); inits = true; } } } //Debug.Log("输入的是否一致:"+ textMesh.text==inputField.text); } }