How to sort list with Vector3 variables?

Make a level editor - you need all the objects to drive into the array list and sort the array so that 1 was the vector with the lowest value, and latest with the greatest.
June 3rd 19 at 19:07
1 answer
June 3rd 19 at 19:09
Implement the interface IComparable<t></t> if you own a class, and then the usual list.Sort() will sort using your own comparison. Or create a helper class with IComparer<t></t> if you need only one comparison method, and point it to the Sort method.
At worst describe directly in place:
parts.Sort(delegate(Part x, Part y)
 if (x.PartName == null && y.PartName == null) return 0;
 else if (x.PartName == null) return -1;
 else if (y.PartName == null) return 1;
 else return x.PartName.CompareTo(y.PartName);

Find more questions by tags C#Development of gamesUnity Game Engine