mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
explain StartServer
This commit is contained in:
parent
fd0e2b18c3
commit
9d9625b42f
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user