Author Topic: [3.7.3] UICamera errors on buttons with onPress and onRelease trigger  (Read 7196 times)

Lotti

  • Newbie
  • *
  • Thank You
  • -Given: 5
  • -Receive: 0
  • Posts: 47
    • View Profile
I notice error spawning on this latest release about using onPress and onRelease triggers (UIEvent Trigger).

Errors are:
- Failed to call function OnDragStart of class UIEventTrigger
Calling function OnDragStart 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:1065)
UICamera:ProcessTouch(Boolean, Boolean) (at Assets/NGUI/Scripts/UI/UICamera.cs:1720)
UICamera:ProcessMouse() (at Assets/NGUI/Scripts/UI/UICamera.cs:1402)
UICamera:ProcessTouches() (at Assets/NGUI/Scripts/UI/UICamera.cs:1474)
UICamera:Update() (at Assets/NGUI/Scripts/UI/UICamera.cs:1221)

- Failed to call function OnDragEnd of class UIEventTrigger
Calling function OnDragEnd 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:1065)
UICamera:ProcessTouch(Boolean, Boolean) (at Assets/NGUI/Scripts/UI/UICamera.cs:1768)
UICamera:ProcessMouse() (at Assets/NGUI/Scripts/UI/UICamera.cs:1402)
UICamera:ProcessTouches() (at Assets/NGUI/Scripts/UI/UICamera.cs:1474)
UICamera:Update() (at Assets/NGUI/Scripts/UI/UICamera.cs:1221)



Changes i made:

line 1720 on UICamera.cs
from Notify(currentTouch.dragged, "OnDragStart", null); to Notify(currentTouch.dragged, "OnDragStart", currentTouch.dragged);

line 1768 on UICamera.cs
from Notify(currentTouch.dragged, "OnDragEnd", null); to Notify(currentTouch.dragged, "OnDragEnd", currentTouch.dragged);

but i don't know if they are correct. they just prevent spawning errors.

hrlarsen

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

Lotti

  • Newbie
  • *
  • Thank You
  • -Given: 5
  • -Receive: 0
  • Posts: 47
    • View Profile
Re: [3.7.3] UICamera errors on buttons with onPress and onRelease trigger
« Reply #2 on: September 24, 2014, 07:48:37 AM »
thanks