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

  1.             if (UICamera.currentTouchID == -2)
  2.             {
  3.                 Debug.Log("rightclicked");
  4.  
  5.             }
  6.             if (UICamera.currentTouchID == -1)
  7.             {
  8.                 Debug.Log("leftclicked");
  9.             }

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:
  1. using UnityEngine;
  2.  
  3. public class Test : MonoBehaviour
  4. {
  5.         void OnClick ()
  6.         {
  7.                 Debug.Log("Touch ID: " + UICamera.currentTouchID);
  8.         }
  9. }
  10.  
Hit play, left click, right click, middle click. See

Touch ID: -1
Touch ID: -2
Touch ID: -3