You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

33 lines
1.1 KiB

// --------------------------------------------------------------------------------------------------------------------
// <copyright file="DocLinkButton.cs" company="Exit Games GmbH">
// Part of: Pun demos
// </copyright>
// <author>developer@exitgames.com</author>
// --------------------------------------------------------------------------------------------------------------------
using Photon.Pun.Demo.Shared;
using UnityEngine;
using UnityEngine.EventSystems;
namespace Photon.Pun.Demo.Cockpit
{
/// <summary>
/// Open an Url on Pointer Click.
/// </summary>
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));
}
}
}