22 lines
379 B
C#
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());
|
|
});
|
|
}
|
|
}
|
|
}
|
|
} |