MOST Editor
A plug-and-play Unity editor bundle of attributes, drawers, and utility structs that supercharge inspectors—no custom editor boilerplate needed.
MOSTRange (Property)
1) Quick Definition
Serializable struct storing a Min/Max float pair with built‑in order safety (Min ≤ Max
) and GetRandomValue()
.
2) Example
// Define a MOSTRange property
[Tooltip("Base damage range in HP")]
public MOSTRange BaseDamage = new(5f, 12f);
// ____ Usecase ____
BaseDamage.GetRandomValue();
// return a random float value between 5 and 12
BaseDamage.Min
// return or set the minimum value of the BaseDamage
// The min/max values will be recalculated after any of BaseDamage values are edited
// In case the entered minimum value is bigger than the max value...
//Exampe
BaseDamage.Min = 15;
// now min will become 12 and max = 15..
BaseDamage.Max
// return or set the maximum value of the BaseDamage
// The min/max values will be recalculated after any of BaseDamage values are edited
// In case the entered maximum value is smaller than the max value...
//Exampe
BaseDamage.Max = 3;
// now min will become 3 and max = 5..
3) What You’ll See in the Inspector
Single line with two labeled float fields: Min | Max. Values auto-correct when swapped.
Image Here...

MinMaxSlider (Attribute)
1) Quick Definition
Draws a float range editor with numeric fields and a MinMaxSlider
. Hard limits may be constants or resolved from sibling properties. require MOSTRange
2) Example
// A) Both limits are constants
[MinMaxSlider(0f, 100f)] // slider clamps to [0, 100]
public MOSTRange volumeDb;
// B) Both limits come from sibling fields (by name)
public float minLimit = 0f; // must be serialized
public float maxLimit = 1f; // must be serialized
[MinMaxSlider(nameof(minLimit), nameof(maxLimit))]
public MOSTRange threshold;
// C) Min from ref, Max constant
public float floor = -10f;
[MinMaxSlider(nameof(floor), 10f)]
public MOSTRange clipRange;
// D) Min constant, Max from ref
public float ceiling = 2f;
[MinMaxSlider(0f, nameof(ceiling))]
public MOSTRange normalized;
3) What You’ll See in the Inspector
A slider min/max with values clamped to the resolved hard limits.

MOSTRangeInt (Property)
1) Quick Definition
Serializable struct storing a Min/Max Int pair with built‑in order safety (Min ≤ Max
) and GetRandomValue()
.
2) Example
// Define a MOSTRange property
[Tooltip("Base damage range in HP")]
public MOSTRangeInt BaseDamage = new(5, 12);
// ____ Usecase ____
BaseDamage.GetRandomValue();
// return a random Int value between 5 and 12
BaseDamage.Min
// return or set the minimum value of the BaseDamage
// The min/max values will be recalculated after any of BaseDamage values are edited
// In case the entered minimum value is bigger than the max value...
//Exampe
BaseDamage.Min = 15;
// now min will become 12 and max = 15..
BaseDamage.Max
// return or set the maximum value of the BaseDamage
// The min/max values will be recalculated after any of BaseDamage values are edited
// In case the entered maximum value is smaller than the max value...
//Exampe
BaseDamage.Max = 3;
// now min will become 3 and max = 5..
3) What You’ll See in the Inspector
Single line with two labeled int fields: Min | Max. Values auto-correct when swapped.
Image Here...

MinMaxSliderInt (Attribute)
1) Quick Definition
Draws an int range editor with numeric fields and a MinMaxSliderInt
. Hard limits may be constants or resolved from sibling properties. require MOSTRangeInt
2) Example
// A) Both limits are constants
[MinMaxSliderInt(0, 100)] // slider clamps to [0, 100]
public MOSTRangeInt volumeDb;
// B) Both limits come from sibling fields (by name)
public int minLimit = 0; // must be serialized
public int maxLimit = 1; // must be serialized
[MinMaxSliderInt(nameof(minLimit), nameof(maxLimit))]
public MOSTRangeInt threshold;
// C) Min from ref, Max constant
public int floor = -10;
[MinMaxSliderInt(nameof(floor), 10)]
public MOSTRangeInt clipRange;
// D) Min constant, Max from ref
public int ceiling = 2;
[MinMaxSliderInt(0, nameof(ceiling))]
public MOSTRangeInt normalized;
3) What You’ll See in the Inspector
A slider min/max with values clamped to the resolved hard limits.

BigHeader (Attribute)
1) Quick Definition
Draws a bold, colored section header (with underline). Great for organizing large inspectors.
2) Example
//
// Base // r g and b can be byte or float...
[BigHeader(text: "Header", r = 1, g = 1, b = 1, fontSize = 15)]
// Examples
[BigHeader("Header 1 <")] // default gold, size 15
public int dummy;
[BigHeader("Header 2 <", 0.2f,0.8f,1f)] // custom color (float rgb)
public int dummy;
[BigHeader("Header 3 <", (byte)255,0,0)] // custom color (byte rgb)
public int dummy;
[BigHeader("Header 4 <", 18)] // custom font size
public int dummy;
[BigHeader("Header 5 <", 0.8f,0.2f,0.2f, 20)] // color + size (float)
public int dummy;
[BigHeader("Header 6 <", (byte)10,20,30, 22)] // color + size (byte)
public int dummy;
3) What You’ll See in the Inspector
A bold label in the chosen color with a thin underline above the property.

Line (Attribute)
1) Quick Definition
Adds a centered horizontal separator line with customizable thickness, width %, color, and vertical spacing
2) Example
//
// Base
[Line(float thickness = 1f, // 1 = 100%
float width = 1f,
float r = 0.34f,
float g = 0.34f,
float b = 0.34f,
float a = 1f,
float spacing = 7f))] // default: thin grey full-width
// More
[Line]
public int dummy;
[Line(2f)] // thicker
public int dummy;
[Line(1f, 0.6f)] // 60% width, centered
public int dummy;
[Line(1f, 1f, 1f,0f,0f,1f, 10f)] // width=100%, red, spacing=10
public int dummy;
3) What You’ll See in the Inspector
A simple divider line.

ReadOnly (Attribute)
1) Quick Definition
Shows a field disabled (non-editable) while preserving layout and height.
2) Example
//
[ReadOnly] public float dummy = 100;
3) What You’ll See in the Inspector
The field appears greyed out and cannot be edited.

ReadOnlyIf (Attribute)
1) Quick Definition
Conditionally disables a field based on a boolean or enum (optionally a second condition).
2) Example
//
// an enum for testing
public enum Mode { A, B, C }
// A) Boolean condition
public bool Condition;
[ReadOnlyIf(nameof(Condition), true)]
public float dummy; // disabled when Condition == true
// B) Single enum value
public Mode mode1;
[ReadOnlyIf(nameof(mode1), Mode.B)]
public float disabledWhenB;
public Mode mode2;
[ReadOnlyIf(nameof(mode2), Mode.B, false)]
public float disabledWhenNotB;
// C) One field, either of two enum values
public Mode m;
[ReadOnlyIf(nameof(m), Mode.A, Mode.C)]
public float disabledWhenA_Or_C;
// D) Two separate enum fields (AND logic)
public Mode m1; public Mode m2;
[ReadOnlyIf(nameof(m1), Mode.A, true, nameof(m2), Mode.C, true)]
public float disabledWhen_m1A_AND_m2C;
3) What You’ll See in the Inspector
Field is visible but greyed out when the condition(s) match.

HideIf (Attribute)
1) Quick Definition
Conditionally hides a field entirely (collapses layout space) based on boolean/enum comparisons.
2) Example
//
// an enum for testing
public enum Mode { A, B, C }
// A) Boolean condition
public bool Condition;
[HideIf(nameof(Condition), true)]
public float dummy; // Hide when Condition == true
// B) Single enum value
public Mode mode1;
[HideIf(nameof(mode1), Mode.B)]
public float HideWhenB;
public Mode mode2;
[HideIf(nameof(mode2), Mode.B, false)]
public float HideWhenNotB;
// C) One field, either of two enum values
public Mode m;
[HideIf(nameof(m), Mode.A, Mode.C)]
public float HideWhenA_Or_C;
// D) Two separate enum fields (AND logic)
public Mode m1; public Mode m2;
[HideIf(nameof(m1), Mode.A, true, nameof(m2), Mode.C, true)]
public float HideWhen_m1A_AND_m2C;
3) What You’ll See in the Inspector
Well, you will not see this time when the condition(s) match.

HelpBox (Attribute)
1) Quick Definition
Displays a HelpBox above the property with configurable message type and extra spacing.
2) Example
//
// Base
[HelpBox("message", HelpBoxMessageType Type, float spaceBefore, float spaceAfter)]
[HelpBox("This is a default info message")]
public float Info;
[HelpBox("This is just a message", HelpBoxAttribute.HelpBoxMessageType.None)]
public float None;
[HelpBox("This is a Warning message", HelpBoxAttribute.HelpBoxMessageType.Warning)]
public float Warning;
[HelpBox("This is an Error message", HelpBoxAttribute.HelpBoxMessageType.Error)]
public float Error;
3) What You’ll See in the Inspector
A bold label in the chosen color with a thin underline above the property.

GUIColor (Attribute)
1) Quick Definition
Temporarily tints GUI colors while drawing a property (optionally applies to children for complex objects).
2) Example
//
// Using floats (r,g,b,a) and apply-to-children
[GUIColor(1f,1f,0f, 1f, true)]
public float dummy;
// Using color name (case-insensitive)
[GUIColor("cyan", true)]
public AudioMixerGroup dummy;
[GUIColor("red")]
public GameObject dummy;
// all ready-to-use colors (case-insensitive)
"red" => Color.red,
"green" => Color.green,
"blue" => Color.blue,
"yellow" => Color.yellow,
"cyan" => Color.cyan,
"magenta" => Color.magenta,
"white" => Color.white,
"black" => Color.black,
"gray" or "grey" => Color.grey,
"clear" => Color.clear,
3) What You’ll See in the Inspector
A bold label in the chosen color with a thin underline above the property.

Required (Attribute)
1) Quick Definition
For ObjectReference
fields: overlays error icon + Inner-field message when the value is null
.
2) Example
//
[Required]
public GameObject dummy1; // default text: (Require)
[Required("Just Add it")]
public GameObject dummy2; // custom
3) What You’ll See in the Inspector
Normal property field; if empty, shows an error icon and the message inside the input area.

InnerHint (Attribute)
1) Quick Definition
Displays a subtle inline hint inside an empty object reference field (non-blocking helper text).
2) Example
//
[InnerHint("leave me null")]
public GameObject dummy1; // default text: (Require)
[InnerHint("MOST IN ONE")]
public GameObject dummy2; // custom
3) What You’ll See in the Inspector
Shows faint text next to Unity’s None (Type)
caption when empty.

Group (Attribute)
1) Quick Definition
Displays a HelpBox above the property with configurable message type and extra spacing.
2) Example
//
[Group("Group A")] public float dummy1;
[Group("Group A")] public float dummy2;
[Group("Group A")] public float dummy3;
[Group("Group B")] public float dummy11;
[Group("Group B")] public float dummy22;
[Group("Group B")] public float dummy33;
3) What You’ll See in the Inspector
A shaded header with a foldout triangle; all fields with the same name appear inside when expanded.
HideScriptField (ClassOnly Attribute)
1) Quick Definition
When applied to a MonoBehaviour
or ScriptableObject
class, the top m_Script
field is hidden by custom editors (for a cleaner look).
2) Example
//
[HideScriptField]
public class MyBehaviour : MonoBehaviour
{
// your script
}
[HideScriptField]
public class MyAsset : ScriptableObject
{
// your script
}
3) What You’ll See in the Inspector
The script reference row is omitted only if all selected targets carry [HideScriptField]
.

HideScriptField
not added

HideScriptField
added
Last updated