unity-inspector

Review Unity C# Inspector fields and recommend attributes and validation rules.

8|1|Updated Oct 7, 2025
One-click install
npx skills add https://github.com/Zzulin/unity-project01 --skill unity-inspector-zzulin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-inspector
Source: https://github.com/Zzulin/unity-project01/tree/main/URP1/Plugins/Unity-Skills-main/SkillsForUnity/unity-skills~/skills/inspector
Command: npx skills add https://github.com/Zzulin/unity-project01 --skill unity-inspector-zzulin

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Unity scripts are often difficult to author, configure, and review because Inspector fields are exposed inconsistently, lack descriptive tooltips and grouping, and miss lightweight editor-time validation, which leads to confusion and runtime misconfiguration.

Core Features & Use Cases

  • Field exposure strategy: Recommend which fields should be public, [SerializeField] private, or hidden to reduce API surface and accidental misuse.
  • Recommended attributes: Advise use of Header, Tooltip, Space, Range, Min, TextArea, RequireComponent, and CreateAssetMenu to clarify intent and enforce constraints.
  • Validation & UX: Suggest OnValidate usage for normalization, separation of debug-only fields, and grouping fields by responsibility for better handoff between developers and designers.
  • Use Case: When preparing a MonoBehaviour or ScriptableObject for handoff to designers, use this skill to produce attribute annotations, default safety checks, and a checklist to tidy the Inspector.

Quick Start

Use the unity-inspector skill to review MyComponent.cs and return a field exposure strategy, recommended attributes, and OnValidate validation rules.

Frequently Asked Questions about unity-inspector

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I organize Unity Inspector fields to prevent runtime misconfiguration?

Standardize Unity Inspector fields by defining a field exposure strategy using SerializeField for private fields, adding Tooltip and Header attributes for grouping, and implementing OnValidate logic to catch configuration errors at editor time.

When should I use SerializeField versus public fields in Unity MonoBehaviours?

Use SerializeField for private fields in Unity MonoBehaviours when data needs Inspector visibility without expanding the public API surface, reserving public fields strictly for components requiring external script access to minimize accidental misuse.

What is the best way to add tooltips and grouping to Unity ScriptableObject Inspectors?

The best way to add tooltips and grouping to Unity ScriptableObject Inspectors is applying Header, Tooltip, and Space attributes to C# fields, clarifying designer intent and logically separating fields by responsibility for safer handoff and review.

How do I enforce constraints and validation in the Unity Inspector without running the game?

Enforce Unity Inspector constraints by adding Range and Min attributes to C# fields and implementing OnValidate methods to normalize values and execute lightweight editor-time validation checks before runtime execution.

Does RequireComponent work with ScriptableObject and CreateAssetMenu workflows?

RequireComponent enforces mandatory component dependencies on MonoBehaviours, while CreateAssetMenu streamlines ScriptableObject asset generation; both standardize Unity Inspector workflows safely and improve editor-time authoring UX.

Why does my Unity Inspector look cluttered and how can I tidy it for designer handoff?

A cluttered Unity Inspector often results from inconsistent field exposure and missing attributes; tidy it by grouping fields with Header and Space, adding Tooltip annotations, and separating debug-only fields to ensure clear designer handoff.