1
This commit is contained in:
@@ -18,11 +18,17 @@ namespace Studio
|
||||
rectTransform = GetComponent<RectTransform>();
|
||||
}
|
||||
|
||||
private void Update()
|
||||
private void OnEnable()
|
||||
{
|
||||
if (rectTransform == null)
|
||||
return;
|
||||
{
|
||||
Debug.Log($"Not Found RectTransform in MouseObserver. {gameObject}");
|
||||
Destroy(this);
|
||||
}
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
// 마우스가 자신의 UI(RectTransform) 영역 위에 있는지 판별
|
||||
bool isOver = RectTransformUtility.RectangleContainsScreenPoint(
|
||||
rectTransform,
|
||||
|
||||
Reference in New Issue
Block a user