explain StartServer

This commit is contained in:
vis2k 2020-01-01 12:16:01 +01:00
parent fd0e2b18c3
commit 9d9625b42f

View File

@ -315,6 +315,22 @@ void SetupServer()
/// <returns></returns>
public void StartServer()
{
// StartServer is inherently ASYNCHRONOUS (=doesn't finish immediately)
//
// Here is what it does:
// Listen
// if onlineScene:
// LoadSceneAsync
// ...
// FinishLoadScene
// SpawnObjects
// else:
// SpawnObjects
//
// there is NO WAY to make it synchronous because both LoadSceneAsync
// and LoadScene do not finish loading immediately. as long as we
// have the onlineScene feature, it will be asynchronous!
SetupServer();
// scene change needed? then change scene and spawn afterwards.