//get the index of field's value within array of values private static int IndexOfFieldRelative(BGCurve curve, string name) { var result = curve.IndexOfFieldValue(name); if (result < 0) { throw new UnityException("Can not find a field with name " + name); } return(result); }
public float GetFloat(string name) { return(PrivateValuesForFields.floatValues[curve.IndexOfFieldValue(name)]); }