Fixed an issue with Lag Comp where an exception would be thrown when several HitShape Containers are positioned in the same place.

This commit is contained in:
Karrar
2024-06-24 17:10:56 +03:00
parent 26ceabcd86
commit 9a2129ed9c
9 changed files with 11 additions and 5 deletions

View File

@@ -17,6 +17,8 @@ namespace Netick.Samples
public bool AutoStart;
public bool AutoConnect;
public bool ShowDisconnectButton = true;
public bool ShowConnectButton = true;
[Header("Network")]
[Range(0, 65535)]
@@ -72,12 +74,16 @@ namespace Netick.Samples
{
if (Sandbox.IsConnected)
{
GUI.Label(new Rect(10, 130, 200, 50), $"Connected to {Sandbox.ServerEndPoint}");
if (ShowDisconnectButton)
{
GUI.Label(new Rect(10, 130, 200, 50), $"Connected to {Sandbox.ServerEndPoint}");
if (GUI.Button(new Rect(10, 220, 200, 50), "Disconnect"))
Sandbox.DisconnectFromServer();
if (GUI.Button(new Rect(10, 220, 200, 50), "Disconnect"))
Sandbox.DisconnectFromServer();
}
}
else
else if (ShowConnectButton)
{
if (GUI.Button(new Rect(10, 10, 200, 50), "Connect"))
Sandbox.Connect(Port, ServerIPAddress);