public static ServerSeasonPass GetSeasonPass() { AccelByteServerPlugin.CheckPlugin(); return(AccelByteServerPlugin.seasonPass ?? (AccelByteServerPlugin.seasonPass = new ServerSeasonPass( new ServerSeasonPassApi( AccelByteServerPlugin.config.BaseUrl, AccelByteServerPlugin.httpClient), AccelByteServerPlugin.session, AccelByteServerPlugin.config.Namespace, AccelByteServerPlugin.coroutineRunner))); }
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; }; }