Using NGUI 3.5.3, Unity Pro, Win 7.
In looking at UIPanelTool.cs, line 124, the comment says the panel tool's entries should be being sorted alphabetically. However, the sort function is comparing using UIPanel.CompareFunc(), which apparently defaults to sorting based on panel depth and then GetInstanceID(), and does no alphabetical comparison. It would be far more useful (to me anyway) if the panels of the same depth were actually sorted alphabetically before resorting to using the instance IDs.
I propose changing UIPanel.cs to use this updated CompareFunc():
/// <summary>
/// Function that can be used to depth-sort panels.
/// </summary>
static public int CompareFunc (UIPanel a, UIPanel b)
{
if (a != b && a != null && b != null)
{
if (a.mDepth < b.mDepth) return -1;
if (a.mDepth > b.mDepth) return 1;
int sortRet = string.Compare(a.name, b.name);
if (sortRet != 0) return sortRet;
return (a.GetInstanceID() < b.GetInstanceID()) ? -1 : 1;
}
return 0;
}
I have tested this and it seems to work fine here.