Author Topic: UIcamera - Failed to call function OnClick of class UIImageButton  (Read 3845 times)

Adratus

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Hello,

I have been messing around with NGUI draggable camera, with much success!

I also wanted to be able to Drag buttons around without their press effect taking place. i saw in another thread that the solution someone found was to use OnClick events on buttons, as opposed to OnPress.

However, now I can no longer click on buttons without this error appearing:

Failed to call function OnClick of class UIImageButton
Calling function OnClick with no parameters but the function requires 1.
UnityEngine.GameObject:SendMessage(String, Object, SendMessageOptions)
UICamera:Notify(GameObject, String, Object) (at Assets/NGUI/Scripts/UI/UICamera.cs:647)
UICamera:ProcessTouch(Boolean, Boolean) (at Assets/NGUI/Scripts/UI/UICamera.cs:1155)
UICamera:ProcessMouse() (at Assets/NGUI/Scripts/UI/UICamera.cs:909)
UICamera:Update() (at Assets/NGUI/Scripts/UI/UICamera.cs:764)

Anyone know why? I have the lastest version of NGUI installed. Any help would be greatly appreciated!!

Adratus

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Re: UIcamera - Failed to call function OnClick of class UIImageButton
« Reply #1 on: May 28, 2013, 12:14:59 PM »
AHHhhhhhhhhhhhhhhh, don't worry, I fixed it :).