我想在我的gameObject 2D上检测点击/触摸事件.
这是我的代码:
void Update() { if (Input.touchCount > 0) { Debug.Log("Touch"); } }
Debug.Log("Touch"); 当我点击屏幕或我的gameObject时没有显示.
Debug.Log("Touch");
c# click touch unity-game-engine
c# ×1
click ×1
touch ×1
unity-game-engine ×1