I am using adding two variables in my SetValues list. The variables are Position and Value. Now I want to check in my List what is the maximum Value and what is the minimum Value (For only "Value"). Now when I do the following:
[Serializable]
public struct SetValues {
public float Position;
public float Value;
}
public List<SetValues> setValues;
void Start () {
Debug.Log (setValues.Value.Min ());
}
It says that "does not contain a definition for 'Value' and no accessible extension method 'Value' accepting a first argument of type could be found". The only reason I want to use List is to avoid iteration that should be done when using an array. But what is the mistake am I doing here?