added Ready, NameChange, LobbyTitleChange

Added the function "AuthHost" (lobby.cs) )which can be used to check if the request comes from a host
This commit is contained in:
DerTyp187
2021-11-28 20:20:11 +01:00
parent 95219e730e
commit c56f1d4a49
17 changed files with 1342 additions and 289 deletions

View File

@@ -1,11 +1,17 @@
using Mirror;
using UnityEngine;
using TMPro;
public class MenuStartHost : MonoBehaviour
{
[SerializeField] private TMP_InputField UsernameInput;
public void StartHost()
{
Debug.Log("[MENU] Starting host...");
NetworkManager.singleton.StartHost();
if (UsernameInput.text != null)
{
Debug.Log("[MENU] Starting host...");
GameObject.FindGameObjectWithTag("VariableSaver").GetComponent<VariableSaver>().username = UsernameInput.text;
NetworkManager.singleton.StartHost();
}
}
}