public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) { FixedNumberAttribute a = ((FixedNumberAttribute)this.attribute); long orgValue = property.longValue; long value = orgValue; LSEditorUtility.DoubleField( position, label, ref value, a.Timescaled ); if (a.Ranged) { if (value > a.Max) { value = a.Max; } else if (value < a.Min) { value = a.Min; } } if (orgValue != value) { property.longValue = value; } }
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) { long value = property.longValue; LSEditorUtility.DoubleField( position, label, ref value, ((FixedNumberAttribute)this.attribute).Timescaled ); property.longValue = value; }