Author Topic: nobody feels NGUI 3.9.4 Tweener OnFinished, Button Click Method hard to use?  (Read 3340 times)

dreamever99

  • Newbie
  • *
  • Thank You
  • -Given: 3
  • -Receive: 0
  • Posts: 5
    • View Profile
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 ?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Might want to post the code you're using... I don't understand what you're doing from your description.

dreamever99

  • Newbie
  • *
  • Thank You
  • -Given: 3
  • -Receive: 0
  • Posts: 5
    • View Profile
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.


dreamever99

  • Newbie
  • *
  • Thank You
  • -Given: 3
  • -Receive: 0
  • Posts: 5
    • View Profile
Only I have the problem UIButton OnClick Method showing on the Inspector mixed up ???

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Make sure your NGUI is up to date (the 'b' revision).

dreamever99

  • Newbie
  • *
  • Thank You
  • -Given: 3
  • -Receive: 0
  • Posts: 5
    • View Profile
 :'( 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.