22 lines
477 B
C#
22 lines
477 B
C#
using System.Runtime.InteropServices;
|
|
using UnityEngine;
|
|
|
|
public class OpenBrowser
|
|
{
|
|
|
|
|
|
public static void OpenURL(string url)
|
|
{
|
|
// 调用iOS原生方法打开URL
|
|
// if (Application.platform == RuntimePlatform.IPhonePlayer)
|
|
// {
|
|
// _openURL(url);
|
|
// }
|
|
// else
|
|
// {
|
|
// 在非iOS平台上,你可以使用Unity的Application.OpenURL方法
|
|
Application.OpenURL(url);
|
|
// }
|
|
}
|
|
}
|