NetworkConnectionHelper에 localhost client 접속 버튼 추가
This commit is contained in:
@@ -62,6 +62,23 @@ namespace Northbound
|
||||
}
|
||||
}
|
||||
|
||||
public void StartLocalhostClient()
|
||||
{
|
||||
if (NetworkManager.Singleton == null)
|
||||
{
|
||||
Debug.LogError("[NetworkConnectionHelper] NetworkManager not found!");
|
||||
return;
|
||||
}
|
||||
|
||||
ConfigureTransport("127.0.0.1", port);
|
||||
|
||||
if (!NetworkManager.Singleton.IsClient && !NetworkManager.Singleton.IsServer)
|
||||
{
|
||||
NetworkManager.Singleton.StartClient();
|
||||
Debug.Log($"[NetworkConnectionHelper] Connecting to localhost:{port}");
|
||||
}
|
||||
}
|
||||
|
||||
public void StartServer()
|
||||
{
|
||||
if (NetworkManager.Singleton == null)
|
||||
|
||||
Reference in New Issue
Block a user