// --------------------------------------------------------------------------------------------------------------------
//
// Part of: Pun demos
//
// developer@exitgames.com
// --------------------------------------------------------------------------------------------------------------------
using Photon.Pun.Demo.Shared;
using UnityEngine;
using UnityEngine.EventSystems;
namespace Photon.Pun.Demo.Cockpit
{
///
/// Open an Url on Pointer Click.
///
public class DocLinkButton : MonoBehaviour, IPointerClickHandler
{
public DocLinks.DocTypes Type = DocLinks.DocTypes.Doc;
public string Reference = "getting-started/pun-intro";
// Just so that Unity expose the enable Check Box inside the Component Inspector Header.
public void Start(){}
//Detect if a click occurs
public void OnPointerClick(PointerEventData pointerEventData)
{
Application.OpenURL(DocLinks.GetLink(Type,Reference));
}
}
}