Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Lotti on September 24, 2014, 06:28:22 AM

Title: [3.7.3] UICamera errors on buttons with onPress and onRelease trigger
Post by: Lotti on September 24, 2014, 06:28:22 AM
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.
Title: Re: [3.7.3] UICamera errors on buttons with onPress and onRelease trigger
Post by: hrlarsen on September 24, 2014, 07:30:19 AM
See this post http://www.tasharen.com/forum/index.php?topic=11234.0
Title: Re: [3.7.3] UICamera errors on buttons with onPress and onRelease trigger
Post by: Lotti on September 24, 2014, 07:48:37 AM
thanks