I can't seem to figure out how to get this working I'd usually use Mathf.Min(myArray) to find the lowest value in an array, but right now i need to use a generic list of floats instead Mathf.Min doesn't take generic lists as input. I was hoping there might be a MyList.Min property, but it doesn't seem so. With a bit of googling, i found this function: https://msdn.microsoft.com/library/bb919785(v=vs.90).aspx It looks like what i need, but i can't for the life of me figure out how to use it. Can someone give me a syntax example of how to use that, assuming my list is declared as so. and then has values added to it: Code (CSharp): List<float> myList = new List<float>();
List.Min() returns an instance of the minimum element in the list. So from what I understand you could just do the following: Code (CSharp): float myMin = myList.Min(); Debug.Log(myMin); Not tested in unity, as per the documentation this is a .Net 3.5 feature if I recall correctly Unity uses an older version but don't quote me on that I might be wrong.