Author Topic: Mouseclick not working  (Read 4438 times)

fued

  • Guest
Mouseclick not working
« on: September 04, 2013, 07:28:32 AM »
Hi, i just downloaded the newest version of unity on my mac, and installed ngui on it.

the examples work fine with the keyboard, but the mouse click isnt working on the buttons.

vexe

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 153
    • View Profile
Re: Mouseclick not working
« Reply #1 on: September 04, 2013, 07:54:37 AM »
Hello, good choice you made with NGUI. But in order for us to help, you have to give more details.

1- Is there a collider attached to the button?
2- if so, did you make sure that it's not behind the button?
3- if you did everything right and still your button isn't receiving input, your best course of action is to enable/check the "Debug" option in the UICamera script attached to your UI camera. Then, you'll get feedback to what the camera is hitting / what is in front of it.
« Last Edit: September 04, 2013, 08:01:08 AM by vexe »

fued

  • Guest
Re: Mouseclick not working
« Reply #2 on: September 04, 2013, 08:38:04 PM »
ok, thought it was pretty clear but after re-reading it maybe it wasnt haha

I installed the latest version of unity on my mac
I installed NGUI

I opened Example 1 from the examples tab

The mousehover and mouseclick events are not firing( one of the other examples had keyboard movement, and that was working fine)

The example has a collider attached to the button, i tried moving it forwards once it didnt work, didnt seem to make any difference.

I enabled debug mode, but i didnt get any feedback whatsoever when clicking(new to unity, i assumed this feedback would be in the console?)

vexe

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 153
    • View Profile
Re: Mouseclick not working
« Reply #3 on: September 05, 2013, 12:24:13 AM »
Hmm, this is strange. No not in the console, you should see it in the top left corner of your game screen, a string telling you what collider the ray from the camera is hitting.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Mouseclick not working
« Reply #4 on: September 05, 2013, 04:40:53 AM »
Raycast Hit Triggers in physics settings.

Check the FAQ sticky post.

vexe

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 153
    • View Profile
Re: Mouseclick not working
« Reply #5 on: September 07, 2013, 10:28:30 AM »
Make sure you got your "EventRecieverMask" in your UICamera set to whatever layer your gui camera should see (your gui cam's culling mask).