2025-05-18 01:04:31 +08:00

22 lines
379 B
C#

using UnityEngine;
using UnityEngine.UI;
namespace Kunpo.Privacy
{
class TextLink : MonoBehaviour
{
private void Awake()
{
var text = GetComponent<Text>();
var btn = GetComponent<Button>();
if (text && btn & !string.IsNullOrEmpty(text.text.Trim()))
{
btn.onClick.AddListener(() =>
{
Application.OpenURL(text.text.Trim());
});
}
}
}
}