public static ServerLobby GetLobby() { if (AccelByteServerPlugin.lobby == null) { CheckPlugin(); AccelByteServerPlugin.lobby = new ServerLobby( new ServerLobbyApi( AccelByteServerPlugin.config.LobbyServerUrl, AccelByteServerPlugin.httpWorker), AccelByteServerPlugin.session, AccelByteServerPlugin.config.Namespace, AccelByteServerPlugin.coroutineRunner); } return(AccelByteServerPlugin.lobby); }
static AccelByteServerPlugin() { #if UNITY_EDITOR // Handle an unexpected behaviour if Domain Reload (experimental) is disabled EditorApplication.playModeStateChanged += state => { if (state == PlayModeStateChange.ExitingEditMode) { hasBeenInitialized = false; accessToken = null; server = null; dedicatedServerManager = null; ecommerce = null; statistic = null; qos = null; gameTelemetry = null; achievement = null; lobby = null; cloudSave = null; } }; }
static AccelByteServerPlugin() { #if UNITY_EDITOR // Handle an unexpected behaviour if Domain Reload (experimental) is disabled EditorApplication.playModeStateChanged += state => { if (state != PlayModeStateChange.ExitingEditMode) { return; } AccelByteServerPlugin.hasBeenInitialized = false; AccelByteServerPlugin.accessToken = null; AccelByteServerPlugin.server = null; AccelByteServerPlugin.dedicatedServerManager = null; AccelByteServerPlugin.ecommerce = null; AccelByteServerPlugin.statistic = null; AccelByteServerPlugin.qos = null; AccelByteServerPlugin.gameTelemetry = null; AccelByteServerPlugin.achievement = null; AccelByteServerPlugin.lobby = null; AccelByteServerPlugin.cloudSave = null; AccelByteServerPlugin.seasonPass = null; }; }