Horje
unity sort a list Code Example
unity sort a list
playerList.Sort((p1,p2)=>p1.score.CompareTo(p2.score));
unity3d sort list
// listVariable = The list of objects/vars etc.
// 'delegate' command - aka callback
// a / b - the values to compare
// N.B. possible return values are 1, 0 and -1. The .compare method 
// can be used on multiple var types to ease sorting, e.g. int, float, string.
listVariable.Sort(delegate(ObjectType a, ObjectType b)
    {
    	// E.g.
        return string.Compare(a.param, b.param);
	});




Csharp

Related
c# get files of type in directory Code Example c# get files of type in directory Code Example
how to lerp in c# Code Example how to lerp in c# Code Example
unity c# throw exception Code Example unity c# throw exception Code Example
how to run a function as administrator in c# Code Example how to run a function as administrator in c# Code Example
c# get first 5 characters of string Code Example c# get first 5 characters of string Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9