/// <summary> /// Used to open URLs. /// </summary> /// <param name="url">The URL to open.</param> /// <param name="open_in_new_tab">Setto true if you want to URL opened in a new tab. WebGL games will prompt the user before doing so (to get around popup blockers).</param> public static void openUrl(string url, bool open_in_new_tab = false) { // if a new tab is requested and we're in WebGL mode, we need to use our plugin magic if (open_in_new_tab && SessionLoader.ngioPluginLoaded()) { Application.ExternalCall("newgroundsio_plugin_openURL", url, "_blank"); } else { Application.OpenURL(url); } }
/// <summary> /// Used to open URLs. /// </summary> /// <param name="url">The URL to open.</param> /// <param name="open_in_new_tab">Setto true if you want to URL opened in a new tab. WebGL games will prompt the user before doing so (to get around popup blockers).</param> public static void openUrl(string url, bool open_in_new_tab = false) { // if a new tab is requested and we're in WebGL mode, we need to use our plugin magic if (open_in_new_tab && SessionLoader.ngioPluginLoaded()) { newgroundsioOpenUrlInNewTab(url); } else { Application.OpenURL(url); } }