22 lines
509 B
C#
22 lines
509 B
C#
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using UnityEngine;
|
||
|
using UnityEngine.EventSystems;
|
||
|
|
||
|
public class UIElementMouseCapturer : EventTrigger
|
||
|
{
|
||
|
|
||
|
public override void OnPointerEnter(PointerEventData eventData)
|
||
|
{
|
||
|
InputManager.Instance.mouseActive = false;
|
||
|
base.OnPointerEnter(eventData);
|
||
|
}
|
||
|
|
||
|
public override void OnPointerExit(PointerEventData eventData)
|
||
|
{
|
||
|
InputManager.Instance.mouseActive = true;
|
||
|
base.OnPointerExit(eventData);
|
||
|
}
|
||
|
|
||
|
}
|