void SetRegionOption(RegionUtils.Provider provider) { EnvironmentInfo environmentInfo = LocaleUtils.GetEnvironmentInfo(); environmentInfo.provider = provider; environmentInfo.cloudEnvironment = CloudEnvironment.Production; Dispatcher.Dispatch(SetLoginSettingActions <EnvironmentInfo> .From(environmentInfo)); SetActiveRegionPopup(false); }
void OnCloudOKButtonClicked() { SetActiveCloudPopup(false); var optionItemButton = m_CloudButtons.FirstOrDefault(e => e.selected); if (optionItemButton == null) { return; } // if set to Default, remove player pref if (optionItemButton.cloudOption == CloudOption.Default) { Dispatcher.Dispatch(DeleteCloudEnvironmentSetting <EnvironmentInfo> .From(true)); Dispatcher.Dispatch(DeleteCloudEnvironmentSetting <EnvironmentInfo> .From(false)); return; } EnvironmentInfo environmentInfo = LocaleUtils.GetEnvironmentInfo(); environmentInfo.cloudEnvironment = CloudEnvironment.Production; switch (optionItemButton.cloudOption) { case CloudOption.Production: environmentInfo.cloudEnvironment = CloudEnvironment.Production; break; case CloudOption.Local: environmentInfo.cloudEnvironment = CloudEnvironment.Local; break; case CloudOption.Staging: environmentInfo.cloudEnvironment = CloudEnvironment.Staging; break; case CloudOption.Test: environmentInfo.cloudEnvironment = CloudEnvironment.Test; break; case CloudOption.Other: environmentInfo.cloudEnvironment = CloudEnvironment.Other; break; } environmentInfo.customUrl = m_CloudURLInput.text; Dispatcher.Dispatch(SetLoginSettingActions <EnvironmentInfo> .From(environmentInfo)); }