Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: stapledon on July 29, 2014, 05:09:03 AM

Title: Overloaded methods raise a Could not find method 'xxx' EventDelegate error
Post by: stapledon on July 29, 2014, 05:09:03 AM
I'm in the process of migrating a project from NGUI 3.0.8f2 to 3.6.8, and so far I've only come across one issue.

Setting a widget's Notify to call a method which has overloads, i.e. foo(), foo(int a), will throw an error. In the quoted example below, there are two SetFXVolume methods, one taking an int.

Quote
Could not find method 'SetFXVolume' on SetCurrentValue
UnityEngine.Debug:LogError(Object, Object)
EventDelegate:Cache() (at Assets/NGUI/Scripts/Internal/EventDelegate.cs:388)
EventDelegate:get_isValid() (at Assets/NGUI/Scripts/Internal/EventDelegate.cs:193)
EventDelegate:IsValid(List`1) (at Assets/NGUI/Scripts/Internal/EventDelegate.cs:629)
UIProgressBar:set_value(Single) (at Assets/NGUI/Scripts/Interaction/UIProgressBar.cs:135)
SetCurrentValue:SetFXVolume(Int32) (at Assets//Code/SetCurrentValue.cs:848)
SetCurrentValue:Start() (at Assets//Code/SetCurrentValue.cs:128)


This hasn't been a problem with prior versions of NGUI and I can't see any mention of it in the release notes?
Title: Re: Overloaded methods raise a Could not find method 'xxx' EventDelegate error
Post by: ArenMook on July 30, 2014, 09:09:09 AM
EventDelegates work differently from system delegates, and them not handling overloaded functions is currently a known issue, but thanks.
Title: Re: Overloaded methods raise a Could not find method 'xxx' EventDelegate error
Post by: numpy on October 09, 2014, 04:09:38 PM
Has this been resolved yet? Currently running into the same issue.
Title: Re: Overloaded methods raise a Could not find method 'xxx' EventDelegate error
Post by: ArenMook on October 10, 2014, 02:38:55 AM
No, I haven't done anything about this one.