Support => NGUI 3 Support => Topic started by: richardwood on September 04, 2014, 05:52:18 AM
Title: how to detect right click on ngui object
Post by: richardwood on September 04, 2014, 05:52:18 AM
hey, how do you detect if user performs right click on my scrollview items? at the moment I'm using this
publicvoid OnClick()
{
if(Input.GetMouseButton(1))
{
Debug.Log("Right click on"+ thisDisplayname);
}
Debug.Log(thisDisplayname);
}
When I left click on my item it works fine, but it doesnt detect my right click, I also browsed somewhere and tried OnRightClick, but it doesnt trigger my debug log
Title: Re: how to detect right click on ngui object
Post by: ArenMook on September 04, 2014, 10:57:16 AM
Get rid of the Input.GetMouseButton line and replace it with "if (UICamera.currentTouchID == -1)".
Title: Re: how to detect right click on ngui object
Post by: petrucio on October 23, 2014, 03:35:57 PM