public void ReturnToHome() { ZoneTransitionService zoneTransitionService = Service.Get <ZoneTransitionService>(); if (zoneTransitionService.IsTransitioning || zoneTransitionService.IsConnecting) { Service.Get <ZoneTransitionService>().CancelTransition(SceneConfig.HomeSceneName); } else { zoneTransitionService.LoadAsZoneOrScene(SceneConfig.HomeSceneName, SceneConfig.TransitionSceneName); } gameStateMachine.SendEvent(DefaultEvent); networkController.LeaveRoom(); }