mirror of
https://github.com/maxartz15/TextureCombiner.git
synced 2024-11-09 23:22:55 +01:00
1165a4e4a8
P4 -> GitHub sync.
24 lines
470 B
C#
24 lines
470 B
C#
using UnityEngine;
|
|
using UnityEngine.EventSystems;
|
|
|
|
namespace TextureCombiner
|
|
{
|
|
public class OpenURL : MonoBehaviour, IPointerClickHandler
|
|
{
|
|
[SerializeField]
|
|
private string m_url = "";
|
|
[SerializeField]
|
|
private bool m_httpsOnly = true;
|
|
|
|
public void OnPointerClick(UnityEngine.EventSystems.PointerEventData eventData)
|
|
{
|
|
if(m_httpsOnly && !m_url.StartsWith("https://"))
|
|
{
|
|
m_url = "https://" + m_url;
|
|
}
|
|
|
|
Application.OpenURL(m_url);
|
|
}
|
|
|
|
}
|
|
} |