Kr/issue 2039 (#2040)

* Update NetworkClient.cs

* Update NetworkServer.cs

* Missed a call
This commit is contained in:
Kyle 2020-06-26 06:18:56 -05:00 committed by GitHub
parent 78bd284b6f
commit d06ee6a21d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -96,7 +96,7 @@ public static void Connect(Uri uri)
connection.SetHandlers(handlers); connection.SetHandlers(handlers);
} }
internal static void ConnectHost() public static void ConnectHost()
{ {
logger.Log("Client Connect Host to Server"); logger.Log("Client Connect Host to Server");
@ -120,7 +120,7 @@ internal static void ConnectHost()
/// <summary> /// <summary>
/// connect host mode /// connect host mode
/// </summary> /// </summary>
internal static void ConnectLocalServer() public static void ConnectLocalServer()
{ {
NetworkServer.OnConnected(NetworkServer.localConnection); NetworkServer.OnConnected(NetworkServer.localConnection);
NetworkServer.localConnection.Send(new ConnectMessage()); NetworkServer.localConnection.Send(new ConnectMessage());
@ -130,7 +130,7 @@ internal static void ConnectLocalServer()
/// disconnect host mode. this is needed to call DisconnectMessage for /// disconnect host mode. this is needed to call DisconnectMessage for
/// the host client too. /// the host client too.
/// </summary> /// </summary>
internal static void DisconnectLocalServer() public static void DisconnectLocalServer()
{ {
// only if host connection is running // only if host connection is running
if (NetworkServer.localConnection != null) if (NetworkServer.localConnection != null)
@ -253,7 +253,7 @@ public static bool Send<T>(T message, int channelId = Channels.DefaultReliable)
return false; return false;
} }
internal static void Update() public static void Update()
{ {
// local connection? // local connection?
if (connection is ULocalConnectionToServer localConnection) if (connection is ULocalConnectionToServer localConnection)

View File

@ -238,7 +238,7 @@ internal static void RemoveLocalConnection()
RemoveConnection(0); RemoveConnection(0);
} }
internal static void ActivateHostScene() public static void ActivateHostScene()
{ {
foreach (NetworkIdentity identity in NetworkIdentity.spawned.Values) foreach (NetworkIdentity identity in NetworkIdentity.spawned.Values)
{ {
@ -472,7 +472,7 @@ public static void DisconnectAllConnections()
} }
// The user should never need to pump the update loop manually // The user should never need to pump the update loop manually
internal static void Update() public static void Update()
{ {
if (!active) if (!active)
return; return;