Skip to content

Instantly share code, notes, and snippets.

@LotteMakesStuff
LotteMakesStuff / MinMaxAttribute.cs
Last active February 10, 2026 19:36
MinMax property drawer for Unity - Add a [MinMax] attribute to a property to draw a useful min/max setting slider.
// NOTE DONT put in an editor folder
using UnityEngine;
public class MinMaxAttribute : PropertyAttribute
{
public float MinLimit = 0;
public float MaxLimit = 1;
public bool ShowEditRange;
public bool ShowDebugValues;