menu_bookDocumentation

Inspector Attributes: Group, Title, Icon, Range, InfoBox, Feature, and More

calendar_today May 4, 2026 schedule ~1 min read person patrickjr verified 50

Inspector Attributes: Controlling How Properties Appear in the Editor

s&box provides a rich set of attributes to control how component properties appear in the inspector. These are applied alongside [Property].

Display and Visibility

CSHARP
[Property]                    // Show in inspector
[Property, Hide]              // Hidden by default (not shown unless explicitly revealed)
[Property, ReadOnly]          // Visible but not editable
[Property, Advanced]          // Hidden unless "Show Advanced Properties" is enabled on the component
[Property, WideMode]          // Value editor fills the next line (label appears above)
[Property, TextArea]          // Multi-line text box for string properties
[Property, InlineEditor]      // Show inline instead of behind a popup
[Property, KeyProperty]       // This property represents the whole object in a single line

Grouping Properties

CSHARP
[Property, Group( "Movement" )]
public float Speed { get; set; }

// Group with icon and collapsed by default
[Property, Group( "Advanced", StartFolded = true )]
public float SomeAdvancedValue { get; set; }

// Toggle group — the group is enabled/disabled by a bool property with the same name
[Property, ToggleGroup( "Enabled" )]
public bool Enabled { get; set; }

[Property, Feature( "Enabled" )]
public float SomeFeatureValue { get; set; }

Metadata Attributes

CSHARP
[Title( "Move Speed" )]
[Description( "How fast the player moves in units per second" )]
[Icon( "directions_run" )]    // Material icon name from fonts.google.com/icons
[Category( "Movement" )]
[Order( 10 )]                 // Sort order in inspector
[Header( "Physics Settings" )] // Header label above this property
[Space( 10 )]                 // Vertical space above this property
[HelpUrl( "https://docs.example.com" )] // Documentation link button

Value Constraints

CSHARP
[Property, Range( 0, 100 )]   // Slider with min/max
[Property, MinMax( 0, 1 )]    // Min/max constraint without slider

Specialized Editors

CSHARP
[Property, InputAction]       // Input action selector for string properties
[Property, ColorUsage( hasAlpha: true, isHDR: false )]
[Property, FontName]          // Font name selector
[Property, IconName]          // Material icon selector
[Property, Normal]            // Normal vector selector
[Property, TargetType( typeof(Component) )] // Type picker constrained to a base type

InfoBox

Displays a colored info box above the property in the inspector:
CSHARP
[Property]
[InfoBox( "This value affects performance!", icon: "warning", tint: EditorTint.Yellow )]
public int MaxParticles { get; set; }
Available tints: White, Pink, Green, Yellow, Blue, Red.

[Button] on Methods

CSHARP
[Button( "Reset to Default", icon: "refresh" )]
public void ResetValues() { ... }
Was this helpful?