using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class InvitePanelScript : MonoBehaviour { public Button closeButton; public Button searchButton; public InputField searchField; public GameObject inviteSearchResultPrefab; // Start is called before the first frame update void Start() { } // Update is called once per frame void Update() { if (searchField.text.Length < 3) { searchButton.interactable = false; } else { searchButton.interactable = true; } } internal void ShowPanel() { CanvasGroup cg = this.GetComponent(); cg.alpha = 1f; cg.interactable = true; cg.blocksRaycasts = true; } internal void HidePanel() { CanvasGroup cg = this.GetComponent(); cg.alpha = 0f; cg.interactable = false; cg.blocksRaycasts = false; } }