Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: Dizzley on November 11, 2016, 06:49:53 AM
Title:
UICamera.currentTouchID not returning right or middle mouse clicks
Post by:
Dizzley
on
November 11, 2016, 06:49:53 AM
Like the title says
if
(
UICamera
.
currentTouchID
==
-
2
)
{
Debug
.
Log
(
"rightclicked"
)
;
}
if
(
UICamera
.
currentTouchID
==
-
1
)
{
Debug
.
Log
(
"leftclicked"
)
;
}
is not doing anything but 'leftclicked' when called from OnClick() in the inspector while clicking on a sprite which is setup properly
Title:
Re: UICamera.currentTouchID not returning right or middle mouse clicks
Post by:
ArenMook
on
November 14, 2016, 06:25:53 AM
Tried a simple test: new scene, ALT+SHIFT+S, ALT+SHIFT+C, attached this script:
using
UnityEngine
;
public
class
Test
:
MonoBehaviour
{
void
OnClick
(
)
{
Debug
.
Log
(
"Touch ID: "
+
UICamera
.
currentTouchID
)
;
}
}
Hit play, left click, right click, middle click. See
Touch ID: -1
Touch ID: -2
Touch ID: -3