public static void GetMaxValue(FieldInfo field, ref float maxValue) { MaxValueAttribute attr = field.GetCustomAttribute<MaxValueAttribute>(); if(attr != null) maxValue = attr.MaxValueFloat; }
public IntSetting(int value, FieldInfo field, string group) : base(field, SettingType.Int, group) { Value = value; MinValueAttribute.GetMinValue(field, ref MinValue); MaxValueAttribute.GetMaxValue(field, ref MaxValue); }