Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - lunadaj

Pages: [1]
1
NGUI 3 Support / Re: Prevent Click Through
« on: March 16, 2018, 03:07:43 AM »
Ello everyone,

I had the same issue. Im using 2Dtoolkit camera for game scene and UIRoot camera for UI. Tired BIS's solution but didnt work for some reasons.
But there's this UICamera.hoveredObject in his code and led me to this solution.

UICamera.interactingWithUI checks if user is interacting with UI, so I put this in LateUpdate like so.

void LateUpdate()
   {
      if(!UICamera.interactingWithUI){
         HandleTouch();
         HandleMouse();
         resetCamera();
      }
      
   }

Hope it helps. :D


Pages: [1]