-
Notifications
You must be signed in to change notification settings - Fork 7
Features Inspector Inspector Overview
Stop writing boilerplate. Start designing in the inspector.
Unity Helpers includes a powerful suite of inspector attributes and serialization types that transform how you author components and data. These features eliminate repetitive code, provide designer-friendly workflows, and make your inspector experience rival commercial tools like Odin Inspector.
Time Savings:
-
Grouping & Organization: Replace 50+ lines of custom editor code with a single
[WGroup]attribute - Method Buttons: Expose test methods in the inspector without writing custom editors
- Conditional Display: Show/hide fields based on values without PropertyDrawer boilerplate
- Selection Controls: Turn enums into toggle buttons, primitives into dropdowns - all declaratively
- Serialization: Store GUIDs, dictionaries, sets, and types with built-in Unity support
Professional Quality:
- Designer-friendly interfaces reduce programmer bottlenecks
- Project-wide settings ensure consistent styling and behavior
- Pagination, animation, and polish - built-in
Control how fields are grouped and organized in the inspector:
- WGroup & WGroupEnd - Boxed sections with optional collapse, auto-inclusion
using UnityEngine;
using WallstopStudios.UnityHelpers.Core.Attributes;
public class TwoWGroupExample : MonoBehaviour
{
[WGroup("Group 1", collapsible: true)]
public float health;
public int intValue;
public string stringValue;
[WGroup("Group 2", collapsible: true)]
public float speed;
public int otherIntValue;
public string otherStringValue;
}
→ Full Guide: Inspector Grouping Attributes
Edit nested objects without losing context:
- WInLineEditor - Embed inspectors for ScriptableObjects, Materials, Textures directly below the field
using UnityEngine;
using WallstopStudios.UnityHelpers.Core.Attributes;
[CreateAssetMenu(fileName = "PowerUpDefinition", menuName = "Power-Up Definition")]
public class PowerUpDefinition : ScriptableObject
{
public string powerUpName;
public Sprite icon;
}
public class WInLineEditorSimpleExample : MonoBehaviour
{
[WInLineEditor]
public PowerUpDefinition powerUp;
}

→ Full Guide: Inspector Inline Editor
Expose methods as clickable buttons in the inspector:
- WButton - One-click method execution with result history, async support, custom styling, grouping
using System;
using System.Collections;
using System.Threading;
using System.Threading.Tasks;
using UnityEngine;
using WallstopStudios.UnityHelpers.Core.Attributes;
using WallstopStudios.UnityHelpers.Core.Extension;
public class WButtonOverviewExample : MonoBehaviour
{
[WButton]
private void Test1()
{
this.Log($"We did it!");
}
[WButton]
private IEnumerator KindaCoroutine()
{
this.Log($"Starting coroutine...");
yield return new WaitForSeconds(1f);
this.Log($"Coroutine finished!");
}
[WButton]
private async Task AsyncWorksToo()
{
await Task.Delay(TimeSpan.FromSeconds(1));
this.Log($"Did it work?");
}
[WButton]
private async Task AsyncWorksTooWithCancellationTokens(CancellationToken ct)
{
await Task.Delay(TimeSpan.FromSeconds(1), ct);
this.Log($"Did it work?");
}
[WButton]
private async ValueTask ValueTasks(CancellationToken ct)
{
await Task.Delay(TimeSpan.FromSeconds(1), ct);
this.Log($"Did it work?");
}
}

→ Full Guide: Inspector Buttons
Show or hide fields based on runtime values:
- WShowIf - Visibility rules with comparison operators (Equal, GreaterThan, IsNull, etc.), inversion, stacking
using UnityEngine;
using WallstopStudios.UnityHelpers.Core.Attributes;
public enum ExampleEnum
{
Option1,
Option2,
Option3,
}
public class WShowIfExamples : MonoBehaviour
{
public bool toggle;
[WShowIf(nameof(toggle))]
public string hiddenByBool;
public int intValue;
[WShowIf(nameof(intValue), WShowIfComparison.GreaterThan, 5)]
public string hiddenByInt;
public ExampleEnum enumValue;
[WShowIf(nameof(enumValue), ExampleEnum.Option2, ExampleEnum.Option3)]
public string hiddenByEnum;
}
→ Full Guide: Inspector Conditional Display
Provide designer-friendly selection controls:
- WEnumToggleButtons - Visual toggle buttons for enums and flag enums
- WValueDropDown - Generic dropdown for any type
- IntDropdown - Integer selection from predefined values
- StringInList - String selection with search and pagination
using System.Collections.Generic;
using UnityEngine;
using WallstopStudios.UnityHelpers.Core.Attributes;
public class WEnumToggleButtonOverview : MonoBehaviour
{
[WEnumToggleButtons]
[IntDropDown(1, 2, 3, 4, 5, 6, 7, 8)]
public List<int> canToggle; // Works in lists!
[WEnumToggleButtons]
[IntDropDown(1, 2, 3, 4, 5, 6, 7, 8)]
public int canToggle2;
[StringInList(typeof(WEnumToggleButtonOverview), nameof(GetStringValues))]
public string canSelectString;
[WValueDropDown(typeof(WEnumToggleButtonOverview), nameof(GetFloatValues))]
public float canSelectFloat;
private IEnumerable<string> GetStringValues()
{
yield return "String1";
yield return "String2";
yield return "String3";
}
private IEnumerable<float> GetFloatValues()
{
yield return 1.0f;
yield return 2.0f;
yield return 3.0f;
}
}
→ Full Guide: Inspector Selection Attributes
Protect data integrity with validation attributes:
- WReadOnly - Display fields as read-only in the inspector
-
WNotNull - Validate required references at runtime with
CheckForNulls()
→ Full Guide: Inspector Validation Attributes
Unity-friendly wrappers for complex data:
- WGuid - Immutable GUID using two longs (faster than System.Guid for Unity)
- SerializableDictionary - Key/value pairs with custom drawer
- SerializableSet - HashSet and SortedSet with duplicate detection, pagination, reordering
- SerializableType - Type references that survive refactoring
- SerializableNullable - Nullable value types

→ Full Guide: Serialization Types
Centralized configuration for all inspector features:
- UnityHelpersSettings - Global settings for pagination, colors, animations, history
Location: ProjectSettings/UnityHelpersSettings.asset
Settings:
- Pagination sizes (buttons, sets, dropdowns)
- Button placement and history capacity
- Color palettes for themes (light/dark/custom)
- Animation speeds for foldouts and groups
- Auto-include defaults

using UnityEngine;
using WallstopStudios.UnityHelpers.Core.Attributes;
public class WButtonSettingsExample : MonoBehaviour
{
[WButton(colorKey: "Documentation Example")]
private void Button() { }
}
→ Full Guide: Inspector Settings
Here's a complete example showcasing multiple inspector features together:
using UnityEngine;
using WallstopStudios.UnityHelpers.Core.Attributes;
using WallstopStudios.UnityHelpers.Core.DataStructure.Adapters;
public class CharacterStats : MonoBehaviour
{
// Grouped fields with collapsible sections
[WGroup("Combat", "Combat Stats", collapsible: true)]
public float maxHealth = 100f; // In group
public float defense = 10f; // In group (auto-included)
[WGroupEnd("Combat")] // attackPower IS included, then closes
public float attackPower = 25f; // In group (last field)
// Conditional visibility based on enum
public enum WeaponType { Melee, Ranged, Magic }
public WeaponType weaponType;
[WShowIf(nameof(weaponType), WShowIfComparison.Equal, WeaponType.Ranged)]
public int ammoCapacity = 30;
// Flag enum as toggle buttons
[System.Flags]
public enum Abilities { None = 0, Jump = 1, Dash = 2, Block = 4 }
[WEnumToggleButtons(showSelectAll: true)]
public Abilities unlockedAbilities;
// Serializable collections
public SerializableDictionary<string, int> stats;
public WGuid entityId = WGuid.NewGuid();
// Inspector button
[WButton("Reset Stats")]
private void ResetStats() => maxHealth = defense = attackPower = 100f;
}For individual feature examples, see the detailed guides linked above.
| Feature | Unity Default | Odin Inspector | Unity Helpers |
|---|---|---|---|
| Grouping/Boxes | Custom Editor | [BoxGroup] |
[WGroup] |
| Foldouts | Custom Editor | [FoldoutGroup] |
[WGroup(collapsible: true)] |
| Method Buttons | Custom Editor | [Button] |
[WButton] |
| Conditional Display | Custom Drawer | [ShowIf] |
[WShowIf] |
| Enum Toggles | Custom Drawer | [EnumToggleButtons] |
[WEnumToggleButtons] |
| Dictionaries | Not Supported | [ShowInInspector] |
SerializableDictionary<K,V> |
| Sets | Not Supported | Custom | SerializableHashSet<T> |
| Type References | Not Supported | Custom | SerializableType |
| Nullable Values | Not Supported | Custom | SerializableNullable<T> |
| Color Themes | Not Supported | Built-in | Project Settings |
| Cost | Free | $55-$95 | Free (MIT) |
Declarative Over Imperative:
- Attributes describe what, not how
- No custom PropertyDrawers for common patterns
- Configuration over code
Designer-Friendly:
- Visual controls for visual people
- Reduce programmer bottlenecks
- Iteration without recompiling
Performance-Conscious:
- Cached reflection delegates
- Pooled buffers for UI rendering
- Minimal GC allocations
Project-Consistent:
- Centralized settings asset
- Predictable behavior across all inspectors
-
Install Unity Helpers - See Installation Guide
-
Explore Examples - Check the guides linked above
-
Configure Settings - Open
ProjectSettings/UnityHelpersSettings.assetto customize pagination, colors, and animations -
Add Attributes - Start with
[WGroup]and[WButton]for immediate impact -
Use Serialization Types - Replace custom wrappers with
SerializableDictionary,SerializableSet, etc.
- Inspector Grouping Attributes - WGroup layout control
- Inspector Inline Editor - WInLineEditor for nested object editing
- Inspector Buttons - WButton for method invocation
- Inspector Conditional Display - WShowIf for dynamic visibility
- Inspector Selection Attributes - WEnumToggleButtons, WValueDropDown, IntDropdown, StringInList
- Inspector Validation Attributes - WReadOnly, WNotNull
- Serialization Types - WGuid, SerializableDictionary, SerializableSet, SerializableType, SerializableNullable
- Inspector Settings - UnityHelpersSettings asset reference
- Odin Inspector Migration Guide - Step-by-step migration from Odin Inspector
- Editor Tools Guide - 20+ automation tools for sprites, animations, validation
- Relational Components - Auto-wire components with attributes
- Effects System - Data-driven buffs/debuffs
- Main Documentation - Complete feature list
Next Steps:
Choose a guide based on what you want to learn first:
- Want organized inspectors? → Inspector Grouping Attributes
- Want method buttons? → Inspector Buttons
- Want conditional fields? → Inspector Conditional Display
- Want better selection controls? → Inspector Selection Attributes
- Want data validation? → Inspector Validation Attributes
- Want to serialize complex data? → Serialization Types
📦 Unity Helpers | 📖 Documentation | 🐛 Issues | 📜 MIT License
- Inspector Button
- Inspector Conditional Display
- Inspector Grouping Attributes
- Inspector Inline Editor
- Inspector Overview
- Inspector Selection Attributes
- Inspector Settings
- Inspector Validation Attributes
- Utility Components
- Visual Components
- Data Structures
- Helper Utilities
- Math And Extensions
- Random Generators
- Reflection Helpers
- Singletons