27 lines
678 B
C#
27 lines
678 B
C#
using System.Collections;
|
||
using System.Collections.Generic;
|
||
using UnityEngine;
|
||
using UnityEngine.Events;
|
||
using UnityEngine.EventSystems;
|
||
//============================================================
|
||
//支持中文,文件使用UTF-8编码
|
||
//@author YangHua
|
||
//@create 20230915
|
||
//@company QianHuo
|
||
//
|
||
//@description:
|
||
//============================================================
|
||
namespace Components
|
||
{
|
||
public class On3DBtnClick : MonoBehaviour
|
||
{
|
||
public UnityEvent onMouseDwon;
|
||
private void OnMouseDown()
|
||
{
|
||
if (EventSystem.current.IsPointerOverGameObject())
|
||
return;
|
||
onMouseDwon?.Invoke();
|
||
}
|
||
}
|
||
}
|