using System.Collections; using System.Collections.Generic; using UnityEngine; using System.Runtime.InteropServices; public class Link : MonoBehaviour { [DllImport("__Internal")] private static extern void OpenURLInExternalWindow(string url); [DllImport("__Internal")] private static extern void OpenNewTab(string url); public void OpenLinkJSPlugin() { print("Click on ==="+name); if(name=="BtnPAY") { if(_G.L==1)OpenURLInExternalWindow("https://ukitchenit.ca/universal/payments/indexeng.php"); if(_G.L==2)OpenURLInExternalWindow("https://ukitchenit.ca/universal/payments/indexfr.php"); if(_G.L==3)OpenURLInExternalWindow("https://ukitchenit.ca/universal/payments/indexspn.php"); } if(name=="btnHELP") { OpenURLInExternalWindow("https://ukitchenit.com/website/tutorial.html"); } if(name=="btnDESIGNER") { Send.SendtoDesigner(); } if(name=="free") { OpenNewTab("https://ukitchenit.com/free/"); } } public void OpenWindow(string url)//"https://youtu.be/StOVrostFdQ") { OpenWindow(name, url); } public static void OpenWindow(string Name, string url) { #if !UNITY_EDITOR && UNITY_WEBGL if(Name=="btnShopify"){OpenURLInExternalWindow(url);} if (Name == "btnVideoAI") {OpenURLInExternalWindow(url);} if (Name == "btnHELP") {OpenURLInExternalWindow(url);} #endif #if UNITY_EDITOR if (Name == "btnShopify") { Application.OpenURL(url); } if (Name == "btnVideoAI") { Application.OpenURL(url); } if (Name == "btnHELP") { Application.OpenURL(url); } #endif if (Name == "free") { OpenNewTab(url); } } }