Beautiful Inspector
Version: 1.1.0
Publisher: ScreamyCat
Asset Store: Get Beautiful Inspector on the Unity Asset Store
Beautiful Inspector is a comprehensive, non-intrusive UI and workflow overhaul for the Unity Inspector. It elevates everyday editor interactions by introducing instant property search, zebra striping, native dictionary visualization, polymorphic type instantiation, and an extensive suite of over 20 plug-and-play workflow attributes—all without modifying Unity's native serialization pipeline.
1. Core Systems
1.1. Global Property Search
Filter complex components instantly:
- Automatic Injection: Injects a responsive search bar at the top of every MonoBehaviour and ScriptableObject inspector.
- Real-Time Substring Filtering: Deeply searches through all properties, foldouts, arrays, and child structures, hiding non-matching elements dynamically.
- One-Click Reset: Dedicated clear button (
X) instantly restores the complete inspector view without resetting scroll positions. - Hub Toggle: Can be toggled globally via Tools > Beautiful Unity Hub > Settings > Beautiful Inspector.
1.2. Zebra Striping
- Alternating Shading: Applies subtle background contrast to alternating inspector rows.
- Readability on High-Resolution Displays: Makes horizontal tracking across wide inspector panels effortless, reducing eye fatigue during long development sessions.
- Universal Alignment: Automatically formats around standard Unity fields, custom drawers, lists, foldouts, and tabs.
1.3. SerializedDictionary<TKey, TValue>
Unity does not natively serialize standard C# Dictionary<TKey, TValue>. Beautiful Inspector provides a full generic implementation:
- Native Inspector Drawer: Features an intuitive two-column key-value editor with element insertion, removal, and reordering.
- Duplicate Key Prevention: Real-time validation warns against duplicate key entries before data corruption occurs.
- Type Agnostic: Full serialization support for primitives, Unity Objects (
GameObject,AudioClip,Material,Sprite), ScriptableObjects, and custom serializable structs. - Full C# Dictionary API: Implements
IDictionary<TKey, TValue>,IReadOnlyDictionary<TKey, TValue>, andISerializationCallbackReceiver.
using UnityEngine;
using ScreamyCat.BeautifulInspector;
public class InventoryManager : MonoBehaviour
{
public SerializedDictionary<string, int> itemCounts = new SerializedDictionary<string, int>();
public SerializedDictionary<GameObject, float> objectWeights = new SerializedDictionary<GameObject, float>();
public SerializedDictionary<string, Color> colorPalette = new SerializedDictionary<string, Color>();
}
1.4. Polymorphic [SerializeReference] Drawers
Unity's [SerializeReference] enables interface and abstract base class serialization, but offers no native editor UI:
- Dynamic Type Selector: Automatically discovers all non-abstract implementations across your project assemblies and presents them in a clean dropdown.
- Inline Instantiation: Select any concrete subclass to instantiate it instantly and edit its exposed fields inline.
- Collection Support: Fully compatible with single references, arrays, and lists of interfaces.
using System;
using System.Collections.Generic;
using UnityEngine;
using ScreamyCat.BeautifulInspector;
public interface IWeapon
{
void Attack();
}
[Serializable]
public class Sword : IWeapon
{
public float bladeLength = 1.2f;
public int sharpness = 100;
public void Attack() { Debug.Log("Swinging sword!"); }
}
[Serializable]
public class Bow : IWeapon
{
public int arrowCount = 30;
public void Attack() { Debug.Log("Firing arrow!"); }
}
public class HeroLoadout : MonoBehaviour
{
[SerializeReference]
public IWeapon equippedWeapon;
[SerializeReference]
public List<IWeapon> inventory = new List<IWeapon>();
}
2. Organization & Layout Attributes
2.1. [Title]
Renders stylized, prominent section headers with support for custom background colors, text colors, hex colors, subtitles, and underlines.
Syntax & Overloads:
[Title(string title)]
[Title(string title, BColor color)]
[Title(string title, string subtitle)]
[Title(string title, string subtitle, BColor color)]
[Title(BColor color, string title, bool DarkText = false)]
[Title(string hexColor, string title, bool DarkText = false)]
Parameters:
title(string): Main heading text.subtitle(string, optional): Smaller descriptive text beneath the heading.color(BColor or hex string): Accent color (BColor.Red,BColor.Green,BColor.Blue,BColor.Yellow,BColor.Purple,BColor.Pink,BColor.Orange,BColor.Gray,BColor.White, or hex"#57e6ff").DarkText(bool, optional): Toggles header text color to dark for high contrast on bright pastel backgrounds.
Example:
using UnityEngine;
using ScreamyCat.BeautifulInspector;
public class TitleDemo : MonoBehaviour
{
[Title("Player Overview")]
public string playerName = "Hero";
[Title("Combat Stats", BColor.Red)]
public int attackDamage = 10;
[Title("Movement Settings", "Configures walk and run speeds")]
public float walkSpeed = 4.5f;
[Title("Magic System", "Elemental spells and pool size", BColor.Purple)]
public int manaPool = 100;
[Title(BColor.Green, "Agility Attributes", DarkText = true)]
public float dodgeChance = 0.15f;
[Title("#FF00FF", "Custom Hex Header", DarkText = true)]
public string specialKey = "Active";
}
2.2. [Foldout]
Groups multiple consecutive fields under a collapsible dropdown header to keep inspectors tidy and organized.
Syntax & Overloads:
[Foldout(string groupName)]
Parameters:
groupName(string): Identifier for the foldout. All consecutive fields sharing this name are enclosed within the foldout.
Example:
using UnityEngine;
using ScreamyCat.BeautifulInspector;
public class FoldoutDemo : MonoBehaviour
{
[Foldout("Physics Properties")]
public float mass = 1.0f;
[Foldout("Physics Properties")]
public float drag = 0.05f;
[Foldout("Physics Properties")]
public bool useGravity = true;
[Foldout("Audio Configuration")]
public AudioClip ambientClip;
[Foldout("Audio Configuration")]
public float volume = 0.8f;
}
2.3. [TabGroup]
Organizes properties into horizontal, responsive tab navigation bars directly inside the Inspector panel.
Syntax & Overloads:
[TabGroup(string tabName)]
Parameters:
tabName(string): The name of the tab where the property or method should reside.
Example:
using UnityEngine;
using ScreamyCat.BeautifulInspector;
public class TabGroupDemo : MonoBehaviour
{
[TabGroup("General")]
public string characterName = "Hero";
[TabGroup("General")]
public GameObject modelPrefab;
[TabGroup("Stats")]
public int level = 1;
[TabGroup("Stats")]
public float experience = 0f;
[TabGroup("Audio & Effects")]
public AudioClip footstepSound;
[TabGroup("Audio & Effects")]
public ParticleSystem spawnVfx;
}
2.4. [Line]
Draws a crisp horizontal divider line to segment adjacent fields without needing a full header banner.
Syntax & Overloads:
[Line]
[Line(BColor color)]
Parameters:
color(BColor, optional): Accent color (BColor.Red,BColor.Green,BColor.Blue,BColor.Yellow,BColor.Purple, etc.). Defaults to a subtle theme divider color.
Example:
using UnityEngine;
using ScreamyCat.BeautifulInspector;
public class LineDemo : MonoBehaviour
{
public string weaponName = "Excalibur";
[Line]
public int baseDamage = 50;
[Line(BColor.Red)]
public int fireDamage = 15;
[Line(BColor.Blue)]
public int iceDamage = 10;
}
2.5. [Grid]
Seamlessly aligns fields into multi-column matrices, coordinate layouts, 2D data grids, or stacked horizontal button bars.
Syntax & Overloads:
[Grid(string groupName, int x = 0, int y = 0)]
[Grid(string groupName, int columns)]
Properties:
ShowBackground(bool, optional, default: true): Renders an enclosed container box behind the grid layout. SetShowBackground = falsefor seamless toolbars and button strips.
Example:
using System.Collections.Generic;
using UnityEngine;
using ScreamyCat.BeautifulInspector;
public class GridDemo : MonoBehaviour
{
// 1. Coordinate Placement Matrix (3x2 Layout)
[Grid("Inventory Layout", 0, 0)] public string slot1 = "Sword";
[Grid("Inventory Layout", 1, 0)] public string slot2 = "Shield";
[Grid("Inventory Layout", 2, 0)] public string slot3 = "Potion";
[Grid("Inventory Layout", 0, 1)] public string slot4 = "Empty";
[Grid("Inventory Layout", 1, 1)] public string slot5 = "Empty";
[Grid("Inventory Layout", 2, 1)] public string slot6 = "Empty";
// 2. Toolbar layout with background disabled
[Grid("Toolbar", 0, 0, ShowBackground = false)] public bool toolSelect;
[Grid("Toolbar", 1, 0, ShowBackground = false)] public bool toolMove;
[Grid("Toolbar", 2, 0, ShowBackground = false)] public bool toolRotate;
// 3. 1D to 2D Array/List Matrix Visualization
[Grid("Boolean Matrix", 15)]
public bool[] boolGrid = new bool[150];
[Grid("Asset Gallery", 5)]
[AssetPreview]
public List<Sprite> assetGrid = new List<Sprite>(25);
// 4. Stacked Action Buttons with custom heights and colors
[Grid("Controls", ShowBackground = false), Button("Play", BColor.Green, DarkText = true, Height = 40)]
private void PlayAction() { Debug.Log("Play"); }
[Grid("Controls", ShowBackground = false), Button("Pause", BColor.Orange, Height = 40)]
private void PauseAction() { Debug.Log("Pause"); }
[Grid("Controls", ShowBackground = false), Button("Stop", BColor.Red, DarkText = true, Height = 40)]
private void StopAction() { Debug.Log("Stop"); }
}
2.6. [Indent]
Modifies visual indentation levels to represent nested dependencies and sub-properties cleanly.
Syntax & Overloads:
[Indent]
[Indent(int amount)]
Parameters:
amount(int, optional, default: 1): Number of indentation steps to apply.
Example:
using UnityEngine;
using ScreamyCat.BeautifulInspector;
public class IndentDemo : MonoBehaviour
{
public bool enablePostProcessing = true;
[Indent] // Default 1-step indentation
public float bloomIntensity = 1.2f;
[Indent(2)] // 2-step indentation
public Color bloomTint = Color.white;
}
2.7. [Label] & [HideLabel]
Overrides the displayed field label or hides it completely to maximize drawing area for full-width curves, sliders, or previews.
Syntax & Overloads:
[Label(string name)]
[HideLabel]
Parameters:
name(string): Custom display text for the property.
Example:
using UnityEngine;
using ScreamyCat.BeautifulInspector;
public class LabelDemo : MonoBehaviour
{
[Label("Master Sound Volume (0.0 to 1.0)")]
public float volMaster = 0.8f;
[Title("Jump Trajectory Curve")]
[HideLabel]
public AnimationCurve jumpCurve;
}
3. Actions & Interactivity Attributes
3.1. [Button]
Transforms C# methods into interactive Inspector buttons. Supports execution mode filters, custom hex/BColor themes, dark text, custom width/height dimensions, and parameter input fields.
Syntax & Overloads:
[Button]
[Button(string buttonName)]
[Button(ButtonMode mode)]
[Button(BColor color)]
[Button(string hexColor, string buttonName)]
[Button(string buttonName, BColor color, ButtonMode mode = ButtonMode.Always, bool DarkText = false)]
[Button(ButtonMode mode, string hexColor, string buttonName, bool DarkText = false)]
[Button(string buttonName, float Width = 0, float Height = 0, BColor Color = BColor.Gray, bool DarkText = false)]
Parameters:
buttonName(string, optional): Text rendered on the button.mode(ButtonMode, optional):ButtonMode.Always,ButtonMode.PlayModeOnly,ButtonMode.EditModeOnly.color(BColor or hex string): Button background color.DarkText(bool, optional): Uses dark text for contrast on bright backgrounds.Width/Height(float, optional): Explicit button dimensions in pixels.
Example:
using UnityEngine;
using ScreamyCat.BeautifulInspector;
public class ButtonDemo : MonoBehaviour
{
[Button]
public void DefaultButton() { Debug.Log("Default button clicked!"); }
[Button("Custom Label Action")]
public void CustomNamedButton() { Debug.Log("Named button clicked!"); }
[Button(ButtonMode.PlayModeOnly)]
public void PlayOnlyAction() { Debug.Log("Active in play mode only!"); }
[Button(BColor.Green)]
public void GreenAction() { Debug.Log("Green button clicked!"); }
[Button("#57e6ff", "Teal Hex Button")]
public void HexColorButton() { Debug.Log("Hex button clicked!"); }
[Button("Play Mode Damage", BColor.Red, ButtonMode.PlayModeOnly, DarkText = true)]
public void DamageAction() { Debug.Log("Damage triggered!"); }
[Button(ButtonMode.EditModeOnly, "#57ff73", "Edit Mode Bake", DarkText = true)]
public void BakeAction() { Debug.Log("Baking scene in edit mode!"); }
[Button("Fixed Size Button", Width = 200, Height = 40, Color = BColor.Orange, DarkText = true)]
public void FixedDimensionsButton() { Debug.Log("Fixed button clicked!"); }
[Button("Execute Spell with Parameters", ButtonMode.PlayModeOnly)]
public void CastSpell(string spellName, float damageAmount)
{
Debug.Log($"Casting {spellName} with {damageAmount} damage!");
}
}
3.2. [ValueButtons]
Injects rapid increment/decrement step buttons or preset buttons directly beside numeric integer and float fields.
Syntax & Overloads:
[ValueButtons]
[ValueButtons(float step1, float step2)]
[ValueButtons(int step1, int step2)]
Parameters:
step1,step2(optional): Fine and coarse increment/decrement step sizes.
Example:
using UnityEngine;
using ScreamyCat.BeautifulInspector;
public class ValueButtonsDemo : MonoBehaviour
{
[ValueButtons] // Default +/- 1 step buttons
public float moveSpeed = 5.5f;
[ValueButtons]
public int maxEnemies = 10;
[ValueButtons(0.01f, 0.5f)] // Custom fine/coarse float steps
public float microSpeed = 0.5f;
[ValueButtons(100, 1000)] // Custom large integer steps
public int hugePopulation = 5000;
}
3.3. [ShowProperty]
Renders non-serialized C# properties (getters) and return-value methods in the Inspector with live real-time values.
Syntax & Overloads:
[ShowProperty]
[ShowProperty(string customLabel)]
Parameters:
customLabel(string, optional): Custom label displayed next to the computed value.
Example:
using UnityEngine;
using ScreamyCat.BeautifulInspector;
public class ShowPropertyDemo : MonoBehaviour
{
public float currentHealth = 75f;
public float maxHealth = 100f;
[ShowProperty]
public int ChildCount => transform.childCount;
[ShowProperty("Health Percentage")]
public string FormattedHealth => $"{(currentHealth / maxHealth * 100f):F1}%";
[ShowProperty]
private Vector3 RandomCoordinate() => new Vector3(Random.value, Random.value, Random.value);
}
3.4. [Expandable]
Embeds and renders any referenced ScriptableObject or UnityEngine.Object (AudioClip, ParticleSystem, Material, Sprite, GameObject) directly inline inside the parent Inspector without switching context!
Syntax & Overloads:
[Expandable]
Example:
using UnityEngine;
using ScreamyCat.BeautifulInspector;
public class ExpandableDemo : MonoBehaviour
{
[Expandable]
[Label("Character Data Asset")]
public ScriptableObject characterData;
[Expandable]
[Label("Sound Effect")]
public AudioClip sfx;
[Expandable]
[Label("Visual Effect")]
public ParticleSystem vfx;
[Expandable]
public Material customMaterial;
[Expandable]
public Sprite characterPortrait;
}
4. Logic, Conditions & Validation Attributes
4.1. [ShowIf] & [HideIf]
Conditionally toggles visibility of fields and buttons based on another boolean field, enum state, or method condition.
Syntax & Overloads:
[ShowIf(string conditionMemberName)]
[HideIf(string conditionMemberName)]
[ShowIf(string conditionMemberName, object expectedValue)]
[HideIf(string conditionMemberName, object expectedValue)]
Parameters:
conditionMemberName(string): Name of a boolean variable, enum, or method returningbool.expectedValue(object, optional): Explicit enum value or constant to match against.
Example:
using UnityEngine;
using ScreamyCat.BeautifulInspector;
public enum WeaponType { Melee, Ranged, Magic }
public class ShowIfDemo : MonoBehaviour
{
public bool hasShield;
[ShowIf("hasShield")]
public float shieldDurability = 100f;
[HideIf("hasShield")]
public string unshieldedWarning = "Vulnerable to direct attacks!";
public WeaponType weaponType;
[ShowIf("weaponType", WeaponType.Magic)]
public float manaCost = 25f;
[HideIf("weaponType", WeaponType.Melee)]
public float projectileSpeed = 40f;
}
4.2. [ReadOnly]
Displays serialized fields in the Inspector while locking them from user modification.
Syntax & Overloads:
[ReadOnly]
Example:
using UnityEngine;
using ScreamyCat.BeautifulInspector;
public class ReadOnlyDemo : MonoBehaviour
{
[ReadOnly]
public string uniqueSessionId = "SESSION_98472";
[ReadOnly]
public float totalPlayTime = 142.5f;
[ReadOnly]
public int frameCounter = 6000;
}
4.3. [Required]
Renders a prominent warning banner if an object reference field is left unassigned (null), preventing null reference exceptions.
Syntax & Overloads:
[Required]
[Required(string errorMessage)]
Parameters:
errorMessage(string, optional): Custom text displayed inside the error banner.
Example:
using UnityEngine;
using ScreamyCat.BeautifulInspector;
public class RequiredDemo : MonoBehaviour
{
[Required]
public Transform spawnPoint;
[Required("Main Player Camera is mandatory for raycast calculations!")]
public Camera playerCamera;
}
4.4. [ValidateInput]
Executes custom C# validation methods on field edits. If validation fails, the field glows red and displays a warning banner.
Syntax & Overloads:
[ValidateInput(string methodName, string errorMessage = "Validation failed")]
Parameters:
methodName(string): Name of a method in the class returningbool.errorMessage(string, optional): Error text displayed when validation returnsfalse.
Example:
using UnityEngine;
using ScreamyCat.BeautifulInspector;
public class ValidateInputDemo : MonoBehaviour
{
[ValidateInput("IsEven", "Number must be an even integer!")]
public int evenNumber = 2;
[ValidateInput("IsFiveLetters", "Name must be exactly 5 letters long!")]
public string characterName = "Hero";
private bool IsEven() => evenNumber % 2 == 0;
private bool IsFiveLetters() => !string.IsNullOrEmpty(characterName) && characterName.Length == 5;
}
4.5. [OnValueChanged]
Executes a designated callback method immediately whenever the decorated field is modified inside the Inspector.
Syntax & Overloads:
[OnValueChanged(string methodName)]
Parameters:
methodName(string): Name of a parameterless method to invoke when the value changes.
Example:
using UnityEngine;
using ScreamyCat.BeautifulInspector;
public class OnValueChangedDemo : MonoBehaviour
{
[OnValueChanged("OnLightSettingsChanged")]
public Color ambientColor = Color.yellow;
[OnValueChanged("OnLightSettingsChanged")]
[Range(0f, 10f)]
public float lightIntensity = 2.5f;
private void OnLightSettingsChanged()
{
var light = GetComponent<Light>();
if (light != null)
{
light.color = ambientColor;
light.intensity = lightIntensity;
}
}
}
5. Visual Selectors & Enhanced Inputs
5.1. [Dropdown]
Populates a native dropdown list dynamically from any method or property that returns a List<T>, T[], or custom class objects (via .ToString()).
Syntax & Overloads:
[Dropdown(string methodName)]
Parameters:
methodName(string): Name of a method or property returning a list, array, or collection.
Example:
using System.Collections.Generic;
using UnityEngine;
using ScreamyCat.BeautifulInspector;
public class DropdownDemo : MonoBehaviour
{
[Dropdown("GetClassNames")]
public string equippedClass;
[Dropdown("GetDamageMultipliers")]
public float currentMultiplier;
[Dropdown("GetPlayerProfiles")]
public string activeProfile;
private List<string> GetClassNames() => new List<string> { "Warrior", "Mage", "Rogue", "Paladin" };
private List<float> GetDamageMultipliers() => new List<float> { 0.5f, 1.0f, 1.5f, 2.0f, 3.0f };
class Profile { public string Name; public Profile(string n) { Name = n; } public override string ToString() => Name; }
private List<Profile> GetPlayerProfiles() => new List<Profile> { new Profile("Profile A"), new Profile("Profile B") };
}
5.2. [EnumToggleButtons]
Replaces generic enum dropdowns with a sleek row of clickable toggle buttons for rapid one-click selection.
Syntax & Overloads:
[EnumToggleButtons]
Example:
using UnityEngine;
using ScreamyCat.BeautifulInspector;
public enum DifficultyLevel { Easy, Normal, Hard, Nightmare }
public enum ClassType { Warrior, Mage, Rogue }
public class EnumToggleDemo : MonoBehaviour
{
[Title("Game Difficulty")]
[EnumToggleButtons]
public DifficultyLevel gameDifficulty = DifficultyLevel.Normal;
[Title("Player Class")]
[EnumToggleButtons]
public ClassType playerClass = ClassType.Warrior;
}
5.3. [MinMaxSlider]
Provides an intuitive dual-thumb range slider for Vector2 fields representing minimum and maximum limits.
Syntax & Overloads:
[MinMaxSlider(float minLimit, float maxLimit)]
Parameters:
minLimit(float): Absolute minimum limit of the slider.maxLimit(float): Absolute maximum limit of the slider.
Example:
using UnityEngine;
using ScreamyCat.BeautifulInspector;
public class MinMaxSliderDemo : MonoBehaviour
{
[MinMaxSlider(0f, 100f)]
public Vector2 damageRange = new Vector2(25f, 75f);
}
5.4. [ProgressBar]
Visualizes numeric float or integer values as colorful progress bars with customizable colors, labels, text visibility, hex codes, and corner radii.
Syntax & Overloads:
[ProgressBar]
[ProgressBar(float max)]
[ProgressBar(float max, string label)]
[ProgressBar(string label, float max)]
[ProgressBar(BColor color)]
[ProgressBar(float max, BColor color)]
[ProgressBar(BColor color, float max)]
[ProgressBar(string hexColor, float max, string label)]
[ProgressBar(float max, string label, BColor color)]
[ProgressBar(string label, BColor color, float max, bool DarkText = false)]
[ProgressBar(BColor color, float max, string label, bool DarkText = false, bool ShowText = true)]
[ProgressBar(BColor color, float max, string label, float CornerRadius = 0f)]
Example:
using UnityEngine;
using ScreamyCat.BeautifulInspector;
public class ProgressBarDemo : MonoBehaviour
{
[ProgressBar] // Default 0-100 Blue bar
public float defaultBar = 50f;
[ProgressBar(200f)]
public float doubleCapacityBar = 120f;
[ProgressBar(100f, "Health Points", BColor.Red)]
public float healthBar = 75f;
[ProgressBar("Mana", BColor.Blue, 150f, DarkText = true)]
public float manaBar = 110f;
[ProgressBar(BColor.Green, 100f, "Stamina", DarkText = true, ShowText = false)]
public float staminaBar = 100f;
[ProgressBar("#FF00FF", 100f, "Custom Hex Bar")]
public float hexBar = 35f;
[ProgressBar(BColor.Yellow, 100f, "Rounded EXP Bar", DarkText = true, CornerRadius = 8f)]
public float expBar = 80f;
}
5.5. [TagSelector] & [LayerSelector]
Dedicated pickers populated with all active project Tags and Physics Layers.
Syntax & Overloads:
[TagSelector] // Applied to string
[LayerSelector] // Applied to int
Example:
using UnityEngine;
using ScreamyCat.BeautifulInspector;
public class TagLayerDemo : MonoBehaviour
{
[TagSelector]
public string enemyTag = "Enemy";
[LayerSelector]
public int groundLayer = 6;
}
5.6. [Scene]
Dropdown selector listing all scenes registered in your Unity Project Build Settings.
Syntax & Overloads:
[Scene]
Example:
using UnityEngine;
using ScreamyCat.BeautifulInspector;
public class SceneDemo : MonoBehaviour
{
[Scene]
public string nextLevelScene;
}
5.7. [FilePath] & [FolderPath]
Adds native operating system browse buttons with optional extension filtering to string path fields.
Syntax & Overloads:
[FolderPath]
[FilePath]
[FilePath(string extensions)]
Parameters:
extensions(string, optional): Comma-separated list of allowed file extensions (e.g."txt,json,xml").
Example:
using UnityEngine;
using ScreamyCat.BeautifulInspector;
public class PathDemo : MonoBehaviour
{
[FolderPath]
public string exportFolder = "Assets/Exports";
[FilePath]
public string anyFile;
[FilePath("txt,json,xml")]
public string specificConfigFile;
}
5.8. [AssetPreview]
Renders visual thumbnail previews beneath object reference fields for Textures, Sprites, Materials, and GameObjects.
Syntax & Overloads:
[AssetPreview]
[AssetPreview(float width, float height)]
Parameters:
width,height(float, optional, default: 64f): Preview dimensions in pixels.
Example:
using UnityEngine;
using ScreamyCat.BeautifulInspector;
public class AssetPreviewDemo : MonoBehaviour
{
[AssetPreview] // Default 64x64 preview
public Texture2D characterTexture;
[AssetPreview(128, 128)] // Custom 128x128 preview
public Sprite inventoryIcon;
[AssetPreview]
public Material customMaterial;
}
5.9. [HelpBox]
Displays stylized informational, warning, error, or neutral callouts inside the Inspector.
Syntax & Overloads:
[HelpBox(string message, HelpBoxMessageType type = HelpBoxMessageType.Info)]
Parameters:
message(string): Alert text content.type(HelpBoxMessageType, optional):Info,Warning,Error,None.
Example:
using UnityEngine;
using ScreamyCat.BeautifulInspector;
public class HelpBoxDemo : MonoBehaviour
{
[HelpBox("This is an informational hint for designers.", HelpBoxMessageType.Info)]
public string hintText = "Tip";
[HelpBox("Caution: Modifying this value may impact physics simulation stability.", HelpBoxMessageType.Warning)]
public float dangerLevel = 0.5f;
[HelpBox("Error: Required prefab reference missing!", HelpBoxMessageType.Error)]
public GameObject missingRef;
[HelpBox("Neutral plain text box without icon.", HelpBoxMessageType.None)]
public string note = "General note";
}
5.10. [AutoTextArea]
Provides multiline text fields that automatically expand vertically as lines of text are typed.
Syntax & Overloads:
[AutoTextArea]
Example:
using UnityEngine;
using ScreamyCat.BeautifulInspector;
public class AutoTextAreaDemo : MonoBehaviour
{
[Title("Dialogue Transcript")]
[AutoTextArea]
public string dialogueText = "Greetings, brave traveler! Welcome to our village.";
}
6. Complete Architecture Example
Here is a practical MonoBehaviour demonstrating multiple Beautiful Inspector attributes combined into a production-grade editor interface:
using System.Collections.Generic;
using UnityEngine;
using ScreamyCat.BeautifulInspector;
public class BossEntity : MonoBehaviour
{
[Title("Boss Overview", "Core Identity & Classification", BColor.Pink)]
public string bossName = "Ignis the Scorched";
[TagSelector]
public string entityTag = "Boss";
[TabGroup("Combat")]
[Title("Vital Stats", BColor.Green)]
[ProgressBar(1000f, "Health Points", BColor.Green)]
public float currentHealth = 1000f;
[TabGroup("Combat")]
[MinMaxSlider(10f, 150f)]
public Vector2 attackDamageRange = new Vector2(40f, 85f);
[TabGroup("Combat")]
[EnumToggleButtons]
public BossPhase currentPhase = BossPhase.Normal;
[TabGroup("Combat")]
[ShowIf("currentPhase", BossPhase.Enraged)]
[HelpBox("Enraged mode multiplies damage by 2.5x!", HelpBoxMessageType.Warning)]
public float rageMultiplier = 2.5f;
[TabGroup("Loot & Spawns")]
[Title("Drop Table", BColor.Yellow)]
public SerializedDictionary<string, float> lootDropChances = new SerializedDictionary<string, float>();
[TabGroup("Audio")]
[Required("Roar audio clip is required!")]
public AudioClip roarClip;
[TabGroup("Debug")]
[ShowProperty("Health Status")]
public string HealthStatus => currentHealth > 0 ? "Alive" : "Defeated";
[TabGroup("Debug")]
[Button("Deal 200 Damage", ButtonMode.PlayModeOnly, Color = BColor.Red, DarkText = true)]
public void TestDamage()
{
currentHealth = Mathf.Max(0, currentHealth - 200f);
}
}
public enum BossPhase { Normal, Empowered, Enraged, Defeated }
7. Configuration & Hub Settings
Global preferences can be customized via the Beautiful Unity Hub:
- Open Tools > Beautiful Unity Hub.
- Select Settings > Beautiful Inspector.
- Available options include:
- Enable Search Bar: Toggle global property filtering across all component inspectors.
- Enable Zebra Striping: Toggle alternating row background shading.
- Custom Drawer Defaults: Configure dictionary layout styles and polymorphism drawer behaviors.
8. Technical Specifications
| Property | Details |
|---|---|
| Unity Compatibility | Unity 2021.3 LTS, 2022.3 LTS, Unity 6, Unity 6.5+ |
| Render Pipelines | Built-in, Universal RP (URP), High Definition RP (HDRP) |
| Namespace | ScreamyCat.BeautifulInspector |
| Assemblies | ScreamyCat.BeautifulInspector.Runtime.asmdef & ScreamyCat.BeautifulInspector.Editor.asmdef |
| Runtime Overhead | Zero — 100% native PropertyDrawer architecture without serialization hacks. |