public void Initialize(bool isHost) { NetworkingManager.Singleton.ConnectionApprovalCallback = ApprovalCheck; stateMachine = new ServerStateMachine(); stateMachine.ChangeState(ServerModeType.Waiting); if (isHost) { NetworkingManager.Singleton.StartHost(EnviromentManager.Singleton.GetSpawnPosition(0)); } else { NetworkingManager.Singleton.StartServer(); } }