public void OnClick() { Singleton.Get <MenuManager>().ButtonClick.Play(); Application.OpenURL(RedirectTo); }
/// <summary> /// Called when any scene after the first one is loaded. /// </summary> public override void SceneAwake(Singleton globalGameObject) { // Check if we've populated any translations if (translationDictionary.Count <= 0) { // Check if we're testing a language if (string.IsNullOrEmpty(testLanguage) == true) { // Retrieve the default language settings from GameSettings GameSettings settings = Singleton.Get <GameSettings>(); currentLanguage = settings.Language; if (Debug.isDebugBuild == true) { Debug.Log("Retrieved language from settings: " + currentLanguage); } // Check to see if we support the system language if (headerDictionary.ContainsKey(Application.systemLanguage) == true) { // Set the default language defaultLanguage = headerDictionary[Application.systemLanguage]; if (Debug.isDebugBuild == true) { Debug.Log("Retrieved default language from language map: " + currentLanguage); } // Check to see if the current language is an empty string if (string.IsNullOrEmpty(currentLanguage) == true) { // If it is, use the default language instead currentLanguage = defaultLanguage; // Update the settings settings.Language = currentLanguage; } } } else { // If so, set both the current and default language to the test language defaultLanguage = testLanguage; currentLanguage = testLanguage; if (Debug.isDebugBuild == true) { Debug.Log("Retrieved language from testLanguage: " + testLanguage); } } if (Debug.isDebugBuild == true) { Debug.Log("Language settings, current: " + currentLanguage + ", and default: " + defaultLanguage); } // Check which parameter to use to load the next file if (loadFileAsset != null) { ParseFile(loadFileAsset); } else if (string.IsNullOrEmpty(loadFileName) == false) { ParseFile(loadFileName); } else { Debug.LogWarning("No file found for CSVLanguageParser"); } } }
public void OnOptionsClicked() { // Open the options dialog Singleton.Get <MenuManager>().Show <OptionsMenu>(); }