> 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="/files/g5QM1gS1pRzLBKNjgdqq" 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="/files/pgHcAmZeMEGa6ZZXnoUp" 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="/files/g5QM1gS1pRzLBKNjgdqq" 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="/files/pgHcAmZeMEGa6ZZXnoUp" 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="/files/UcX0CIBWL3pF5iE8YcJT" 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="/files/sV7b9ycalkHbdCsFaLIg" 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="/files/HyxgaFs0AirSYdYfNRFU" 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="/files/2UhLXpHeIJ3HgUE4qwAd" 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="/files/jH3NgpH5c00doeMJmzgs" 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="/files/Ayd8PCiiM1UGv8ABZbC1" 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="/files/SedE3wrFO9QLGcevVr42" 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="/files/vxbZFjjL5sq9jW4jDh45" 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="/files/OmkAlaQRlLCZlbPkeJz0" 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="/files/E3Nrl7IA4xpMDQtIGabG" alt=""><figcaption><p>If <code>HideScriptField</code> not added    </p></figcaption></figure>

<figure><img src="/files/utf361SIWl493OHtP9Zs" alt=""><figcaption><p>If <code>HideScriptField</code> added    </p></figcaption></figure>

***
