This commit is contained in:
2023-11-28 11:41:03 +05:30
commit da3b6cf083
1281 changed files with 97466 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
using UnityEngine;
using UnityEngine.UI;
namespace Mirror.Examples.Chat
{
public class LoginUI : MonoBehaviour
{
[Header("UI Elements")]
[SerializeField] internal InputField usernameInput;
[SerializeField] internal Button hostButton;
[SerializeField] internal Button clientButton;
[SerializeField] internal Text errorText;
public static LoginUI instance;
void Awake()
{
instance = this;
}
// Called by UI element UsernameInput.OnValueChanged
public void ToggleButtons(string username)
{
hostButton.interactable = !string.IsNullOrWhiteSpace(username);
clientButton.interactable = !string.IsNullOrWhiteSpace(username);
}
}
}