NetworkClient.SetupLocalConnection renamed to ConnectHost for consistency with NetworkClient.Connect (it does almost the same anyway)

This commit is contained in:
vis2k 2019-12-31 11:08:58 +01:00
parent b36c347200
commit a472edd14c
2 changed files with 4 additions and 4 deletions

View File

@ -110,9 +110,9 @@ public static void Connect(Uri uri)
connection.SetHandlers(handlers);
}
internal static void SetupLocalConnection()
internal static void ConnectHost()
{
if (LogFilter.Debug) Debug.Log("Client Connect Local Server");
if (LogFilter.Debug) Debug.Log("Client Connect Host to Server");
RegisterSystemHandlers(true);

View File

@ -407,7 +407,7 @@ public virtual void StartHost()
// is called after the server is actually properly started.
OnStartHost();
// SetupLocalConnection needs to be called BEFORE SpawnObjects:
// ConnectHost needs to be called BEFORE SpawnObjects:
// https://github.com/vis2k/Mirror/pull/1249/
// -> this sets NetworkServer.localConnection.
// -> localConnection needs to be set before SpawnObjects because:
@ -431,7 +431,7 @@ public virtual void StartHost()
//
// -> localClientActive needs to be true, otherwise the hook
// isn't called in host mode!
NetworkClient.SetupLocalConnection();
NetworkClient.ConnectHost();
// scene change needed? then change scene and spawn afterwards.
if (IsServerOnlineSceneChangeNeeded())