저는 UIToolkit으로 놀아 왔습니다. 정말 멋지 네요. 내 클릭이 버튼을 통과하지만 UI를 클릭하면 내 레이 캐스트도 시작됩니다. 클릭/터치가 GUI에 있는지 확인하는 방법이 있습니까?UIToolkit 버튼을 사용하지 마십시오.
편집 :
foreach (var touchable in _gui.touchableSprites) {
if (!touchable.hidden && touchable.hitTest(new Vector2(clickPos.x, Screen.height - clickPos.y))) return;
}
감사 : 나는 Prime31의 UIToolkit 해결
을 사용하고 있습니다.
현대에서 당신은 단지 이것을 할 수 있습니다 http://answers.unity3d.com/questions/784617/how-do-i-block-touch-events-from-propagating-throu.html – Fattie