/**************************************************************************** * Copyright 2019 Nreal Techonology Limited. All rights reserved. * * This file is part of NRSDK. * * https://www.nreal.ai/ * *****************************************************************************/ using System; using UnityEngine; using UnityEngine.EventSystems; namespace NRKernal.NRExamples { /// A user define button. public class UserDefineButton : MonoBehaviour, IPointerClickHandler { /// The on click. public Action OnClick; /// Use this callback to detect clicks. /// Current event data. public void OnPointerClick(PointerEventData eventData) { if (OnClick != null) { OnClick(gameObject.name); } } } }