mirror of
https://github.com/DerTyp7/defrain-shooter-unity.git
synced 2025-10-29 20:52:10 +01:00
19 lines
411 B
C#
19 lines
411 B
C#
using Mirror;
|
|
using UnityEngine.UI;
|
|
using UnityEngine;
|
|
|
|
public class HostBtnScript : MonoBehaviour
|
|
{
|
|
private GameObject GameManager;
|
|
private void Start()
|
|
{
|
|
gameObject.GetComponent<Button>().onClick.AddListener(HostServer);
|
|
GameManager = GameObject.Find("GameManager");
|
|
}
|
|
|
|
public void HostServer()
|
|
{
|
|
GameManager.GetComponent<NetworkManager>().StartHost();
|
|
}
|
|
}
|