Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: dreamever99 on November 16, 2015, 10:37:50 PM

Title: nobody feels NGUI 3.9.4 Tweener OnFinished, Button Click Method hard to use?
Post by: dreamever99 on November 16, 2015, 10:37:50 PM
I add a TweenAlpha Component and my Monobehaviour Tip Component onto a GameObject. When I add a OnFinished method to TweenAlpha, sth wrong: "Could not find method 'GetComponentsInChildren' on Tip".  But I add the method HideSelf() from Tip Monobehaviour.  It seems that NGUI mixed up the assigned method.
The similar thing happens to UIButton Click Method.
Nothing like this happens in NGUI 3.9.2....
Who can tell me what's wrong ?
Title: Re: nobody feels NGUI 3.9.4 Tweener OnFinished, Button Click Method hard to use?
Post by: ArenMook on November 18, 2015, 04:05:12 PM
Might want to post the code you're using... I don't understand what you're doing from your description.
Title: Re: nobody feels NGUI 3.9.4 Tweener OnFinished, Button Click Method hard to use?
Post by: dreamever99 on November 22, 2015, 09:26:15 PM
Nothing to do with the code.
I just want to say it's hard to assign OnClick Event/Method through Inspector. The Inspector OnClick Event/Delegator showing all mixed up. 
I would like to show you a screenshot to show the problem but could not find how to do it here.

Title: Re: nobody feels NGUI 3.9.4 Tweener OnFinished, Button Click Method hard to use?
Post by: dreamever99 on November 22, 2015, 09:30:55 PM
Only I have the problem UIButton OnClick Method showing on the Inspector mixed up ???
Title: Re: nobody feels NGUI 3.9.4 Tweener OnFinished, Button Click Method hard to use?
Post by: ArenMook on November 25, 2015, 05:16:28 PM
Make sure your NGUI is up to date (the 'b' revision).
Title: Re: nobody feels NGUI 3.9.4 Tweener OnFinished, Button Click Method hard to use?
Post by: dreamever99 on November 27, 2015, 03:14:59 AM
 :'( Let me cry for a moment...
You got the point, it's not v3.9.4b but v3.9.4.
I found the bug in PropertyReferenceDrawer.cs in v3.9.4.
/// <summary>
   /// Convert the specified list of delegate entries into a string array.
   /// </summary>

   static public string[] GetNames (List<Entry> list, string choice, out int index)
   {
      index = 0;
      string[] names = new string[list.Count + 1];
      names[0] = string.IsNullOrEmpty(choice) ? "<Choose>" : choice;

      for (int i = 0; i < list.Count; )
      {
         Entry ent = list;
         string del = NGUITools.GetFuncName(ent.target, ent.name);
         names[++i] = del;
         if (index == 0 && string.Equals(del, choice))
            index = i;
      }
      Array.Sort(names);      //this line must be removed!!!
      return names;
   }

Array.Sort(names);      //this line must be removed!!!
This line cause the EventDelegate names all mixed up.