Custom Value Drawer Attribute

Instead of making a new attribute, and a new drawer, for a one-time thing, you can with this attribute, make a method that acts as a custom property drawer. These drawers will out of the box have support for undo/redo and multi-selection.

public float From = 2, To = 7;

[CustomValueDrawer("MyStaticCustomDrawerStatic")]
public float CustomDrawerStatic;

[CustomValueDrawer("MyStaticCustomDrawerInstance")]
public float CustomDrawerInstance;

[CustomValueDrawer("MyStaticCustomDrawerArray")]
public float[] CustomDrawerArray = new float[] { 3f, 5f, 6f };

private static float MyStaticCustomDrawerStatic(float value, GUIContent label)
{
    return EditorGUILayout.Slider(label, value, 0f, 10f);
}

private float MyStaticCustomDrawerInstance(float value, GUIContent label)
{
    return EditorGUILayout.Slider(label, value, this.From, this.To);
}

private float MyStaticCustomDrawerArray(float value, GUIContent label)
{
    return EditorGUILayout.Slider(value, this.From, this.To);
}