mirror of
https://github.com/DerTyp7/defrain-shooter-unity.git
synced 2025-10-30 13:07:10 +01:00
updated mirror added testofflinescene
This commit is contained in:
16
Assets/Scripts/TestOfflineScene/HostBtnScript.cs
Normal file
16
Assets/Scripts/TestOfflineScene/HostBtnScript.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using Mirror;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine;
|
||||
|
||||
public class HostBtnScript : MonoBehaviour
|
||||
{
|
||||
private void Start()
|
||||
{
|
||||
gameObject.GetComponent<Button>().onClick.AddListener(HostServer);
|
||||
}
|
||||
|
||||
public void HostServer()
|
||||
{
|
||||
NetworkClient.ConnectHost();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user