/// <summary>
/// 基于ugui的eventsystem判断是否有ui遮挡
/// </summary>
/// <returns></returns>
private bool CheckGuiRaycastObjects()
{
PointerEventData eventData = new PointerEventData(EventSystem.current);
eventData.pressPosition = Input.mousePosition;
eventData.position = Input.mousePosition;
List<RaycastResult> list = new List<RaycastResult>();
EventSystem.current.RaycastAll(eventData, list);
//Debug.Log(list.Count);
return list.Count > 0;
}
基于ugui的eventsystem判断是否有ui遮挡
最新推荐文章于 2022-09-05 21:20:50 发布