Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: xiaoniaojjj on May 12, 2014, 11:37:13 AM

Title: Error about EventDelegate!
Post by: xiaoniaojjj on May 12, 2014, 11:37:13 AM
Here is my code:
  TweenAlpha ta = gameObject.AddComponent<TweenAlpha>();
  ta.from = 1f;
  ta.to = 0f;
  ta.delay = delay;
  ta.duration = duration;
 ta.AddOnFinished(new EventDelegate(AlphaOut));   

It works fine in Last version, But alway throws the below Exception when i update to 3.5.9!
How to use it correct?



Failed to bind MUIFloatItemNeedSpaw.AlphaOut
Ambiguous matching in method resolution
UnityEngine.Debug:LogError(Object)
EventDelegate:Cache() (at Assets/NGUI/Scripts/Internal/EventDelegate.cs:359)
EventDelegate:Execute() (at Assets/NGUI/Scripts/Internal/EventDelegate.cs:420)
EventDelegate:Execute(List`1) (at Assets/NGUI/Scripts/Internal/EventDelegate.cs:569)
UITweener:Update() (at Assets/NGUI/Scripts/Tweening/UITweener.cs:224)
Title: Re: Error about EventDelegate!
Post by: ArenMook on May 13, 2014, 08:08:07 AM
You should be using:
  1. EventDelegate.Add(ta.onFinished, AlphaOut);
What does your AlphaOut function look like?