12345678910111213141516171819202122232425262728293031323334353637 |
- /****************************************************************************
- * Copyright 2019 Nreal Techonology Limited. All rights reserved.
- *
- * This file is part of NRSDK.
- *
- * https://www.nreal.ai/
- *
- *****************************************************************************/
- namespace NRKernal.NRExamples
- {
- using UnityEngine;
- using UnityEngine.Events;
- using UnityEngine.EventSystems;
- public class NRInteractiveItem : MonoBehaviour, IPointerClickHandler, IPointerEnterHandler, IPointerExitHandler
- {
- public UnityEvent onPointerClick;
- public UnityEvent onPointerEnter;
- public UnityEvent onPointerOut;
- public void OnPointerClick(PointerEventData eventData)
- {
- onPointerClick?.Invoke();
- }
- public void OnPointerEnter(PointerEventData eventData)
- {
- onPointerEnter?.Invoke();
- }
- public void OnPointerExit(PointerEventData eventData)
- {
- onPointerOut?.Invoke();
- }
- }
- }
|