unity-inspector

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

Updated May 20, 2026
One-click install
npx skills add https://github.com/yuse168/Roomies --skill unity-inspector-yuse168
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: unity-inspector
Source: https://github.com/yuse168/Roomies/tree/main/.agents/skills/unity-skills/skills/inspector
Command: npx skills add https://github.com/yuse168/Roomies --skill unity-inspector-yuse168

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 for designing clean, reviewable Inspector presentations so scripts are easier to author, configure, and validate. ## Core Features & Use Cases - Field Exposure Strategy: Recommends [SerializeField] private over unnecessary public fields and SerializeReference only when polymorphic data is genuinely needed. - Attribute Organization: Advises on [Header], [Tooltip], [Space], [Range], [Min], [TextArea], [RequireComponent], and [CreateAssetMenu] usage to clarify authoring intent. - Validation Guidance: Covers lightweight OnValidate editor-time validation and normalization, plus an Inspector quality checklist covering defaults, grouping, constraints, and debug-field separation. - Use Case: When writing a new MonoBehaviour with tunable gameplay values, use this Skill to decide which fields to expose, how to group and constrain them, and what validation to add so another team member understands the component from the Inspector alone. ## Quick Start Ask the AI to review your Unity component's serialized fields and recommend Inspector attributes, grouping, and validation 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 the Unity Inspector?▼

Use [Header] to group fields by responsibility, [Space] for visual separation, and [Tooltip] to explain each field's purpose. Keep debug-only fields separate from authoring fields so the Inspector stays readable for other team members.

Should I use public fields or SerializeField in Unity?▼

Prefer [SerializeField] private over public fields. It exposes the field in the Inspector for authoring while keeping it encapsulated from other scripts, reducing accidental external modification.

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 missing references. Avoid heavy logic there since it runs frequently in the editor.

When should I use SerializeReference in Unity?▼

Use SerializeReference only when you genuinely need polymorphic serialized data, such as a list of mixed subtype instances. For simple data, plain serializable classes or ScriptableObjects are simpler and safer.

What Unity attributes constrain numeric tuning values in the Inspector?▼

Use [Range] for slider-constrained floats and integers, and [Min] to enforce a lower bound. These prevent designers from entering unsafe tuning values directly in the Inspector.