mirror of
https://github.com/DerTyp7/defrain-shooter-unity.git
synced 2025-10-30 13:07:10 +01:00
Merging
This commit is contained in:
17
Assets/Scripts/HomeMenu/MenuStartHost.cs
Normal file
17
Assets/Scripts/HomeMenu/MenuStartHost.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using Mirror;
|
||||
using UnityEngine;
|
||||
using TMPro;
|
||||
|
||||
public class MenuStartHost : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private TMP_InputField UsernameInput;
|
||||
public void StartHost()
|
||||
{
|
||||
if (UsernameInput.text != "")
|
||||
{
|
||||
Debug.Log("[MENU] Starting host...");
|
||||
GameObject.FindGameObjectWithTag("VariableSaver").GetComponent<VariableSaver>().username = UsernameInput.text;
|
||||
NetworkManager.singleton.StartHost();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user