Author Topic: NGUI OnClick Not being recognized  (Read 5292 times)

warddav16

  • Guest
NGUI OnClick Not being recognized
« on: August 31, 2012, 01:00:00 PM »
Hello, I am currently making a main menu. All of our buttons run animations using the UIPlayAnimation script. We currently have 4 on each button, one that expands the button when you hover over it, two that lerp in objects when you click it, and one that lerps the object itself off screen. Some of the buttons also have scripts that overrides the void OnClick() function. The problem I'm having is, when I try to put another script on the button that overrides OnClick(), its never called. The scripts themselves are working (I can put a debug in start and it will work) but none of the code I put in the OnClick() function actually ever gets called if there is another script on the object already using OnClick. This issue ONLY occurs in the web browser, all OnClick functions are being called in the standalone builds and the editor, and I am unsure of why this would be happening in the web browser only, and what my options are to fix it.

--David

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI OnClick Not being recognized
« Reply #1 on: August 31, 2012, 02:28:50 PM »
OnClick is triggered via SendMessage, so all scripts get it, regardless of how many of them you have on your button. All I can suggest is dig deeper, the problem lies elsewhere.