unity-inspector

Advises on Unity Inspector field organization, attributes, and authoring UX.

Updated Aug 31, 2026
One-click install
npx skills add https://github.com/pikachu0310/codex-agent-ops-public --skill unity-inspector-pikachu0310
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-inspector
Source: https://github.com/pikachu0310/codex-agent-ops-public/tree/main/.agents/skills/unity-skills/skills/inspector
Command: npx skills add https://github.com/pikachu0310/codex-agent-ops-public --skill unity-inspector-pikachu0310

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Unity components with poorly organized serialized fields are hard to configure, review, and hand off to other team members. This Skill provides guidance for structuring Inspector-visible fields so scripts are understandable and safe to author directly in the Unity Editor. ## Core Features & Use Cases - Field Exposure Strategy: Recommends [SerializeField] private over unnecessary public fields and clarifies when SerializeReference is genuinely needed. - Attribute Recommendations: Advises on [Header], [Tooltip], [Space], [Range], [Min], [TextArea], [RequireComponent], and [CreateAssetMenu] usage. - Validation Guidance: Covers lightweight OnValidate usage for editor-time normalization and an Inspector quality checklist covering defaults, grouping, constraints, and debug-field separation. - Use Case: When writing a new MonoBehaviour with many tuning values, use this Skill to decide which fields to expose, which attributes clarify intent, and how to group fields so a designer can configure the component without reading the code. ## Quick Start Ask the AI to review your Unity component's serialized fields and recommend Inspector attributes and organization for better authoring UX.

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 Unity Inspector?

Group fields by responsibility using [Header] and [Space] attributes, 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 vs public fields in Unity?

Use [SerializeField] private for fields that only need Inspector visibility, keeping them inaccessible from other scripts. Reserve public fields for genuine cross-script access, since public members become part of the class API.

When should I use OnValidate in Unity scripts?

Use OnValidate only for lightweight editor-time validation and normalization, such as clamping values or auto-assigning references. Avoid heavy logic, scene modifications, or allocations inside OnValidate since it runs frequently in the editor.

What Unity attributes improve Inspector usability?

Common attributes include [Header], [Tooltip], [Space], [Range], [Min], and [TextArea] for field presentation, plus [RequireComponent] for mandatory sibling components and [CreateAssetMenu] for designer-created data assets.

When should I avoid SerializeReference in Unity?

Use SerializeReference only when polymorphic serialized data is genuinely needed, such as storing subclasses in a single list. For simple data, plain serializable classes or ScriptableObjects are easier to inspect and maintain.