add
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class OpenURLOnClick : MonoBehaviour
|
||||
{
|
||||
void OnClick ()
|
||||
{
|
||||
UILabel lbl = GetComponent<UILabel>();
|
||||
|
||||
if (lbl != null)
|
||||
{
|
||||
string url = lbl.GetUrlAtPosition(UICamera.lastWorldPosition);
|
||||
if (!string.IsNullOrEmpty(url)) Application.OpenURL(url);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user