I want a custom sort to make early because I want to use the name of the gameObject in the purpose except the sort.
UIGrid.cs
// you can set Cusntom Comparer
public System.Comparison<Transform> CustomComparer { get; set; }
public virtual void Reposition()
{
....
if (sorting != Sorting.None || sorted)
{
List
<Transform
> list
= new List
<Transform
>();
for (int i = 0; i < myTrans.childCount; ++i)
{
Transform t = myTrans.GetChild(i);
if (t && (!hideInactive || NGUITools.GetActive(t.gameObject))) list.Add(t);
}
if (sorting == Sorting.Alphabetic) list.Sort(SortByName);
else if (sorting == Sorting.Horizontal) list.Sort(SortHorizontal);
else if (sorting == Sorting.Vertical) list.Sort(SortVertical);
else if (sorting == Sorting.Custom && CustomComparer != null) list.Sort(CustomComparer); // CustomSort
else Sort(list);
....
}
....
}