Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started 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 ?
-
Might want to post the code you're using... I don't understand what you're doing from your description.
-
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.
-
Only I have the problem UIButton OnClick Method showing on the Inspector mixed up ???
-
Make sure your NGUI is up to date (the 'b' revision).
-
:'( 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.