この文書の現在のバージョンと選択したバージョンの差分を表示します。
wiki:unity:asset:ngui:3.9:003 [2016/02/12 13:33] step 作成 |
wiki:unity:asset:ngui:3.9:003 [2016/02/12 14:08] (現在) step |
||
---|---|---|---|
ライン 13: | ライン 13: | ||
void OnPress(bool pressed) | void OnPress(bool pressed) | ||
{ | { | ||
- | Debug.Log("pressed : " + pressed + "currentTouchID : " + UICamera.currentTouchID + "Screen Position : " + UICamera.currentTouch.pos); | + | UICamera.MouseOrTouch touch = UICamera.GetTouch(UICamera.currentTouchID); |
+ | Debug.Log("pressed : " + pressed + "Screen Position : " + touch.pos); | ||
+ | |||
+ | // 1点目だけで良い場合は直接取れる。 | ||
+ | touch = UICamera.currentTouch; | ||
+ | Debug.Log("pressed : " + pressed + "Screen Position : " + touch.pos); | ||
} | } | ||
} | } |