Skip to content

Commit

Permalink
fix: fixing compile in new gui
Browse files Browse the repository at this point in the history
  • Loading branch information
James-Frowen committed May 17, 2021
1 parent 7841794 commit d2800be
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions Assets/Mirage/Runtime/NetworkManagerGUI.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System.Collections;
using System.Collections.Generic;
using Cysharp.Threading.Tasks;
using UnityEngine;

Expand Down Expand Up @@ -82,14 +80,14 @@ private void StatusLabels(Rect position)
{
if (GUILayout.Button("Stop Host"))
{
NetworkManager.Server.StopHost();
NetworkManager.Server.Stop();
}
}
else
{
if (GUILayout.Button("Stop Server"))
{
NetworkManager.Server.Disconnect();
NetworkManager.Server.Stop();
}
}
}
Expand All @@ -102,7 +100,7 @@ private void StatusLabels(Rect position)
NetworkManager.Client.Disconnect();
}
}
else if(NetworkManager.Client.Active)
else if (NetworkManager.Client.Active)
{
GUILayout.Label($"Connecting to {NetworkAddress}...");
//TODO: Implement cancel button when it's possible.
Expand Down Expand Up @@ -167,12 +165,12 @@ private static Vector2 GetPivotFromAnchor(TextAnchor anchor)

private void ClickHost()
{
NetworkManager.Server.StartHost(NetworkManager.Client).Forget();
NetworkManager.Server.StartAsync(NetworkManager.Client).Forget();
}

private void ClickServerOnly()
{
NetworkManager.Server.ListenAsync().Forget();
NetworkManager.Server.StartAsync().Forget();
}

private void ClickClient()
Expand Down

0 comments on commit d2800be

Please sign in to comment.