Aetheria/Assets/Scripts/UI/ClickableCollider.cs
2020-03-29 04:19:24 +01:00

12 lines
338 B
C#

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
public class ClickableCollider : MonoBehaviour
{
public event Action<ClickableCollider, PointerEventData> OnClick;
public void Click(PointerEventData eventData) => OnClick?.Invoke(this, eventData);
}