mirror of
https://github.com/lllyasviel/YGOProUnity_V2.git
synced 2026-10-23 09:58:51 +08:00
18 lines
291 B
C#
18 lines
291 B
C#
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);
|
|
}
|
|
}
|
|
}
|
|
|
|
|