> For the complete documentation index, see [llms.txt](https://solo-player.gitbook.io/most-in-one/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://solo-player.gitbook.io/most-in-one/most-systems/most-editor.md).

# MOST Editor

A plug-and-play Unity editor bundle of attributes, drawers, and utility structs that supercharge inspectors—no custom editor boilerplate needed.

{% hint style="info" %}
Attribute drawers that *hide/disable* fields depend on the compared properties being **serialized** (`public` or `[SerializeField]`).

You may stack multiple drawers per property/field  (`[Line, HideIf, ReadOnly] public`)
{% endhint %}

## <mark style="color:orange;">**MOSTRange (Property)**</mark>

<mark style="color:yellow;">**1) Quick Definition**</mark>

Serializable struct storing a **Min/Max float pair** with built‑in order safety (`Min ≤ Max`) and `GetRandomValue()`.

#### <mark style="color:yellow;">**2) Example**</mark>

```csharp
// 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..
```

#### <mark style="color:yellow;">3) What You’ll See in the Inspector</mark>

Single line with two labeled float fields: **Min | Max**. Values auto-correct when swapped.

Image Here...

<figure><img src="https://1720637334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVjqyL2Am4WC7AkXSTxy%2Fuploads%2FMU0Z7Yfavk8W9yo9xX2P%2FScreenshot%202025-09-27%20at%206.45.23%E2%80%AFAM.png?alt=media&amp;token=66f7e8f8-181e-4fe5-99d7-da7798d2ccdf" alt=""><figcaption></figcaption></figure>

***

## <mark style="color:orange;">**MinMaxSlider (Attribute)**</mark>

<mark style="color:yellow;">**1) Quick Definition**</mark>

Draws a **float range editor** with numeric fields and a `MinMaxSlider`. Hard limits may be constants or resolved from sibling properties. require `MOSTRange` &#x20;

#### <mark style="color:yellow;">**2) Example**</mark>

```csharp
// 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;
```

#### <mark style="color:yellow;">3) What You’ll See in the Inspector</mark>

A slider min/max with values clamped to the resolved hard limits.

<figure><img src="https://1720637334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVjqyL2Am4WC7AkXSTxy%2Fuploads%2Fqn65gTdAt3scvhBwMdvr%2FScreenshot%202025-09-27%20at%207.08.30%E2%80%AFAM.png?alt=media&amp;token=ddf9d922-6523-4c33-953f-0ed162bca33e" alt=""><figcaption></figcaption></figure>

***

## <mark style="color:orange;">**MOSTRangeInt (Property)**</mark>

<mark style="color:yellow;">**1) Quick Definition**</mark>

Serializable struct storing a **Min/Max Int pair** with built‑in order safety (`Min ≤ Max`) and `GetRandomValue()`.

#### <mark style="color:yellow;">**2) Example**</mark>

```csharp
// 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..
```

#### <mark style="color:yellow;">3) What You’ll See in the Inspector</mark>

Single line with two labeled int fields: **Min | Max**. Values auto-correct when swapped.

Image Here...

<figure><img src="https://1720637334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVjqyL2Am4WC7AkXSTxy%2Fuploads%2FMU0Z7Yfavk8W9yo9xX2P%2FScreenshot%202025-09-27%20at%206.45.23%E2%80%AFAM.png?alt=media&amp;token=66f7e8f8-181e-4fe5-99d7-da7798d2ccdf" alt=""><figcaption></figcaption></figure>

***

## <mark style="color:orange;">**MinMaxSliderInt (Attribute)**</mark>&#x20;

<mark style="color:yellow;">**1) Quick Definition**</mark>

Draws an int **range editor** with numeric fields and a `MinMaxSliderInt`. Hard limits may be constants or resolved from sibling properties. require `MOSTRangeInt` &#x20;

#### <mark style="color:yellow;">**2) Example**</mark>

```csharp
// 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;
```

#### <mark style="color:yellow;">3) What You’ll See in the Inspector</mark>

A slider min/max with values clamped to the resolved hard limits.

<figure><img src="https://1720637334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVjqyL2Am4WC7AkXSTxy%2Fuploads%2Fqn65gTdAt3scvhBwMdvr%2FScreenshot%202025-09-27%20at%207.08.30%E2%80%AFAM.png?alt=media&amp;token=ddf9d922-6523-4c33-953f-0ed162bca33e" alt=""><figcaption></figcaption></figure>

***

## <mark style="color:orange;">**BigHeader (Attribute)**</mark>

#### <mark style="color:yellow;">**1) Quick Definition**</mark>

Draws a bold, colored section header (with underline). Great for organizing large inspectors. &#x20;

#### <mark style="color:yellow;">**2) Example**</mark>

```csharp
// 
// 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;
```

#### <mark style="color:yellow;">3) What You’ll See in the Inspector</mark>

A bold label in the chosen color with a thin underline above the property.

<figure><img src="https://1720637334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVjqyL2Am4WC7AkXSTxy%2Fuploads%2F39UU84zCN2dkv0cvTyTA%2FScreenshot%202025-09-27%20at%207.24.48%E2%80%AFAM.png?alt=media&amp;token=c7270473-d823-44b2-bdc3-94e6a686176f" alt=""><figcaption></figcaption></figure>

***

## <mark style="color:orange;">**Line (Attribute)**</mark>

#### <mark style="color:yellow;">**1) Quick Definition**</mark>

Adds a centered horizontal separator line with customizable thickness, width %, color, and vertical spacing

#### <mark style="color:yellow;">**2) Example**</mark>

```csharp
// 
// 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;
```

#### <mark style="color:yellow;">3) What You’ll See in the Inspector</mark>

A simple divider line.

<figure><img src="https://1720637334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVjqyL2Am4WC7AkXSTxy%2Fuploads%2FBLaHmrtmXsh766wcBdo7%2FScreenshot%202025-09-27%20at%207.31.29%E2%80%AFAM.png?alt=media&amp;token=1d3899ac-7e2f-4f89-9343-16782273e9df" alt=""><figcaption></figcaption></figure>

***

## <mark style="color:orange;">**ReadOnly (Attribute)**</mark>

#### <mark style="color:yellow;">**1) Quick Definition**</mark>

Shows a field **disabled** (non-editable) while preserving layout and height.

#### <mark style="color:yellow;">**2) Example**</mark>

```csharp
// 
[ReadOnly] public float dummy = 100;
```

#### <mark style="color:yellow;">3) What You’ll See in the Inspector</mark>

The field appears greyed out and cannot be edited.

<figure><img src="https://1720637334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVjqyL2Am4WC7AkXSTxy%2Fuploads%2FX3zggZIZeeC8tsmeRP6o%2FScreenshot%202025-09-27%20at%207.35.09%E2%80%AFAM.png?alt=media&amp;token=fe20a47c-8e10-4cc9-b61b-8f8e10f35efc" alt=""><figcaption></figcaption></figure>

***

## <mark style="color:orange;">**ReadOnlyIf (Attribute)**</mark>

#### <mark style="color:yellow;">**1) Quick Definition**</mark>

**Conditionally disables** a field based on a boolean or enum (optionally a second condition).

#### <mark style="color:yellow;">**2) Example**</mark>

```csharp
// 
// 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;
```

#### <mark style="color:yellow;">3) What You’ll See in the Inspector</mark>

Field is visible but greyed out when the condition(s) match.

<figure><img src="https://1720637334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVjqyL2Am4WC7AkXSTxy%2Fuploads%2Fd6jpvzhbcVl2ntZN7jrq%2FScreenshot%202025-09-27%20at%208.44.44%E2%80%AFAM.png?alt=media&amp;token=c3a84c8a-2eed-4455-b5f6-1da2450c7e3e" alt=""><figcaption></figcaption></figure>

***

## <mark style="color:orange;">**HideIfAll/Any (Attribute)**</mark>

#### <mark style="color:yellow;">**1) Quick Definition**</mark>

**Conditionally hides** a field entirely (collapses layout space) based on boolean/enum comparisons.

#### <mark style="color:yellow;">**2) Example**</mark>

```csharp
// 
// an enum for testing
public enum Mode { A, B, C }

// C) One field
public Mode m;
[HideIfAll(nameof(m), Mode.A, true)]
public float HideWhen_m1A;

// D) Two separate enum fields (AND logic)
public Mode m1; public Mode m2;
[HideIfAll(nameof(m1), Mode.A, true, nameof(m2), Mode.C, true)]
public float HideWhen_m1A_And_m2C;

// D) Two separate enum fields (AND logic)
public Mode m1; public Mode m2;
[HideIfAny(nameof(m1), Mode.A, true, nameof(m2), Mode.C, true)]
public float HideWhen_m1A_Or_m2C;

```

#### <mark style="color:yellow;">3) What You’ll See in the Inspector</mark>

Well, you will not see this time when the condition(s) match.

<figure><img src="https://1720637334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVjqyL2Am4WC7AkXSTxy%2Fuploads%2FcaRFtdHNKsksWAbMSeLq%2FScreenshot%202025-09-27%20at%208.55.50%E2%80%AFAM.png?alt=media&amp;token=c391f6af-e376-404b-bbe1-d07d4d046d82" alt=""><figcaption></figcaption></figure>

***

## <mark style="color:orange;">**HelpBox (Attribute)**</mark>

#### <mark style="color:yellow;">**1) Quick Definition**</mark>

Displays a **HelpBox** *above* the property with configurable message type and extra spacing.

#### <mark style="color:yellow;">**2) Example**</mark>

```csharp
// 
// 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;

```

#### <mark style="color:yellow;">3) What You’ll See in the Inspector</mark>

A bold label in the chosen color with a thin underline above the property.

<figure><img src="https://1720637334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVjqyL2Am4WC7AkXSTxy%2Fuploads%2Fu16jkQlqCysgVNbLILmh%2FScreenshot%202025-09-27%20at%209.02.24%E2%80%AFAM.png?alt=media&amp;token=a0489330-7bc4-459a-bf99-451c35bc8203" alt=""><figcaption></figcaption></figure>

***

## <mark style="color:orange;">**GUIColor (Attribute)**</mark>

#### <mark style="color:yellow;">**1) Quick Definition**</mark>

Temporarily tints GUI colors while drawing a property (optionally **applies to children** for complex objects).

#### <mark style="color:yellow;">**2) Example**</mark>

```csharp
// 
// 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,

```

#### <mark style="color:yellow;">3) What You’ll See in the Inspector</mark>

A bold label in the chosen color with a thin underline above the property.

<figure><img src="https://1720637334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVjqyL2Am4WC7AkXSTxy%2Fuploads%2FIhI2hPyxwHg6Kf3S4whX%2FScreenshot%202025-09-27%20at%209.09.34%E2%80%AFAM.png?alt=media&amp;token=792df62f-b714-497a-bd8c-2290701ba43e" alt=""><figcaption></figcaption></figure>

***

## <mark style="color:orange;">**Required (Attribute)**</mark>

#### <mark style="color:yellow;">**1) Quick Definition**</mark>

For `ObjectReference` fields: overlays **error icon + Inner-field message** when the value is `null`.

#### <mark style="color:yellow;">**2) Example**</mark>

```csharp
// 
[Required] 
public GameObject dummy1; // default text: (Require)

[Required("Just Add it")] 
public GameObject dummy2; // custom

```

#### <mark style="color:yellow;">3) What You’ll See in the Inspector</mark>

Normal property field; if empty, shows an error icon and the message inside the input area.

<figure><img src="https://1720637334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVjqyL2Am4WC7AkXSTxy%2Fuploads%2FyCY6gnWA3nwfrUxwzE2l%2FScreenshot%202025-09-27%20at%209.42.55%E2%80%AFAM.png?alt=media&amp;token=5a1c3155-b0fe-4296-bb9b-1d8fb9ccc9ab" alt=""><figcaption></figcaption></figure>

***

## <mark style="color:orange;">**InnerHint (Attribute)**</mark>

#### <mark style="color:yellow;">**1) Quick Definition**</mark>

Displays a **subtle inline hint** inside an empty object reference field (non-blocking helper text).

#### <mark style="color:yellow;">**2) Example**</mark>

```csharp
// 
[InnerHint("leave me null")] 
public GameObject dummy1; // default text: (Require)

[InnerHint("MOST IN ONE")] 
public GameObject dummy2; // custom

```

#### <mark style="color:yellow;">3) What You’ll See in the Inspector</mark>

Shows faint text next to Unity’s `None (Type)` caption when empty.

<figure><img src="https://1720637334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVjqyL2Am4WC7AkXSTxy%2Fuploads%2FsehjwVUbEqEPKob6lFuf%2FScreenshot%202025-09-27%20at%209.45.20%E2%80%AFAM.png?alt=media&amp;token=abefc3df-2eea-440e-a83b-486e4e7e4738" alt=""><figcaption></figcaption></figure>

***

## <mark style="color:orange;">**Group (Attribute)**</mark>

#### <mark style="color:yellow;">**1) Quick Definition**</mark>

Displays a **HelpBox** *above* the property with configurable message type and extra spacing.

#### <mark style="color:yellow;">**2) Example**</mark>

```csharp
// 
[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;
```

#### <mark style="color:yellow;">3) What You’ll See in the Inspector</mark>

A shaded header with a **foldout triangle**; all fields with the same name appear inside when expanded.

***

## <mark style="color:orange;">**HideScriptField (ClassOnly Attribute)**</mark>

#### <mark style="color:yellow;">**1) Quick Definition**</mark>

When applied to a `MonoBehaviour` or `ScriptableObject` **class**, the top `m_Script` field is hidden by custom editors (for a cleaner look).

#### <mark style="color:yellow;">**2) Example**</mark>

```csharp
// 
[HideScriptField]
public class MyBehaviour : MonoBehaviour 
{ 
    // your script
}


[HideScriptField]
public class MyAsset : ScriptableObject 
{ 
    // your script
}


```

#### <mark style="color:yellow;">3) What You’ll See in the Inspector</mark>

The script reference row is omitted **only if all selected targets** carry `[HideScriptField]`.

<figure><img src="https://1720637334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVjqyL2Am4WC7AkXSTxy%2Fuploads%2FlE6Olmu9nMXw1DfvYgoB%2FScreenshot%202025-09-27%20at%209.55.04%E2%80%AFAM.png?alt=media&amp;token=625b2f51-2f09-4b69-915e-baed9556aeb3" alt=""><figcaption><p>If <code>HideScriptField</code> not added    </p></figcaption></figure>

<figure><img src="https://1720637334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVjqyL2Am4WC7AkXSTxy%2Fuploads%2F2NgM2a0mHK2GR26IEccl%2FScreenshot%202025-09-27%20at%209.55.15%E2%80%AFAM.png?alt=media&amp;token=820e3874-392d-412c-94fe-eb4612cc9533" alt=""><figcaption><p>If <code>HideScriptField</code> added    </p></figcaption></figure>

***
