unity-inspector

Advises on Unity Inspector field organization, attributes, and validation for component authoring.

2|Updated May 18, 2026
One-click install
npx skills add https://github.com/pcone-mm/NewFPG --skill unity-inspector-pcone-mm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-inspector
Source: https://github.com/pcone-mm/NewFPG/tree/main/.agents/skills/unity-skills/skills/inspector
Command: npx skills add https://github.com/pcone-mm/NewFPG --skill unity-inspector-pcone-mm

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Unity components often expose fields in the Inspector in ways that confuse designers and teammates—public fields everywhere, no grouping, no constraints, and unclear defaults. This Skill provides guidance on structuring serialized fields so components are self-explanatory and safe to configure in the Unity Editor. ## Core Features & Use Cases - Field Exposure Strategy: Recommends [SerializeField] private over public fields and advises when SerializeReference is genuinely needed for polymorphic data. - Attribute Organization: Guides use of [Header], [Tooltip], [Space], [Range], [Min], and [TextArea] to group and clarify fields without over-decorating. - Validation & Safety: Covers OnValidate for lightweight editor-time checks, [RequireComponent] for sibling dependencies, and [CreateAssetMenu] for designer-facing data assets. - Use Case: A gameplay programmer writes a health component and asks how it should appear in the Inspector; the Skill recommends grouping tuning values with headers, constraining values with [Range], and separating debug-only fields from authoring fields. ## Quick Start Ask how to organize the serialized fields of a Unity MonoBehaviour so it is clear and safe to configure in the Inspector.

Frequently Asked Questions about unity-inspector

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

FAQPage Schema
How do I organize serialized fields in the Unity Inspector?

Group fields by responsibility using [Header] and [Space], add [Tooltip] for non-obvious values, and constrain tuning numbers with [Range] or [Min]. Prefer [SerializeField] private over public fields to keep the API surface clean.

When should I use SerializeField instead of public fields in Unity?

Use [SerializeField] private by default: it exposes the field to the Inspector without making it part of the class's public API. Reserve public fields for cases where other scripts genuinely need direct access.

What is OnValidate used for in Unity scripts?

OnValidate runs in the editor when a serialized value changes, making it suitable for lightweight validation and normalization such as clamping values or auto-assigning references. Keep it fast and avoid heavy logic or scene modifications.

When should I use SerializeReference in Unity?

Use SerializeReference only when you genuinely need polymorphic serialized data, such as a list of different subclasses stored in one field. For simple value types and single-class references, standard serialization is simpler and safer.

Should I use CreateAssetMenu for configuration data in Unity?

Yes, use [CreateAssetMenu] on ScriptableObject classes that represent config or data assets designers should create directly from the Project window. This keeps tunable data out of scene components and enables reuse across scenes.