IEnumerator WaitRepopTime(CloudOption cloud) { yield return(new WaitForSeconds(repopTime)); cloud.gameObject.SetActive(true); cloud.StateInit(); }
void OnCloudOptionButtonClicked(CloudOption cloudOption) { m_CloudOtherSelected = cloudOption == CloudOption.Other; EnableCustomInput(m_CloudOtherSelected); CheckCustomUrl(m_CloudURLInput.text); foreach (var button in m_CloudButtons) { button.SelectButton(button.cloudOption == cloudOption); } }
void UpdateSettings() { var environmentInfo = LocaleUtils.GetEnvironmentInfo(); RegionOption regionOption = RegionOption.None; switch (environmentInfo.provider) { case RegionUtils.Provider.GCP: regionOption = RegionOption.Default; break; case RegionUtils.Provider.Tencent: regionOption = RegionOption.China; break; } OptionItemButton selectedButton = null; foreach (var button in m_RegionButtons) { button.SelectButton(button.regionOption == regionOption); if (button.regionOption == regionOption) { selectedButton = button; } } if (selectedButton != null) { m_RegionText.text = $"Region: {selectedButton.label.text}"; } CloudOption cloudOption = CloudOption.Default; if (PlayerPrefs.HasKey(LocaleUtils.SettingsKeys.CloudEnvironment)) { switch (environmentInfo.cloudEnvironment) { case CloudEnvironment.Other: cloudOption = CloudOption.Other; break; case CloudEnvironment.Local: cloudOption = CloudOption.Local; break; case CloudEnvironment.Test: cloudOption = CloudOption.Test; break; case CloudEnvironment.Staging: cloudOption = CloudOption.Staging; break; case CloudEnvironment.Production: cloudOption = CloudOption.Production; break; } } m_CloudOtherSelected = cloudOption == CloudOption.Other; EnableCustomInput(m_CloudOtherSelected); m_CloudURLInput.text = environmentInfo.customUrl; foreach (var button in m_CloudButtons) { button.SelectButton(button.cloudOption == cloudOption); } if (environmentInfo.cloudEnvironment != CloudEnvironment.Production) { m_CloudSettingDebugInfo.gameObject.SetActive(true); if (environmentInfo.cloudEnvironment == CloudEnvironment.Other) { if (PlayerPrefs.HasKey(LocaleUtils.SettingsKeys.CloudEnvironment)) { m_CloudSettingDebugInfo.text = $"Environment: {environmentInfo.customUrl}"; } else { m_CloudSettingDebugInfo.text = $"Environment: {ProjectServerClient.ProjectServerAddress(environmentInfo.provider, Protocol.Http)}"; } } else { m_CloudSettingDebugInfo.text = $"Environment: {environmentInfo.cloudEnvironment}"; } } else { m_CloudSettingDebugInfo.gameObject.SetActive(false); } }
public void RepopCloud(CloudOption cloud) { cloud.gameObject.SetActive(false); StartCoroutine(WaitRepopTime(cloud)); }
private void Awake() { instance = this; // EnableSubscribe(); }