Unity Script Validator
Unity Script Validator
Validates Unity C# scripts against best practices and performance patterns specific to Unity game development.
What This Skill Checks
- Field declarations:
[SerializeField] privateinstead of public fields - Component caching: GetComponent in Awake/Start, not Update (~100x faster)
- String operations: StringBuilder for frequent concatenation
- GameObject.Find: Cache references, avoid in Update (O(n) operation)
- Code organization: #region directives, consistent ordering
- XML documentation:
<summary>tags on public methods - Update vs FixedUpdate: Appropriate usage for physics/non-physics
- Coroutines: Prefer for intermittent tasks over Update
Provides: Issues found, specific fixes, performance impact estimates, refactored code examples.
Compatibility
Applies to Unity 2019.4 LTS and later (including Unity 6).
See patterns.md and examples.md for detailed optimization techniques.
When to Use vs Other Components
Use this Skill when: Quick validation of existing Unity scripts for best practices and common issues
Use @unity-scripter agent when: Writing new code or implementing Unity features from scratch
Use @unity-refactor agent when: Improving code quality, applying design patterns, or modernizing legacy code
Use @unity-performance agent when: Deep performance profiling, memory optimization, or platform-specific tuning
Use /unity:new-script command when: Creating new scripts from production-ready templates
Related Skills
- unity-scene-optimizer: For scene-level performance analysis
- unity-template-generator: For generating validated script templates
More from dev-gom/claude-code-marketplace
unity ui toolkit
Assists with Unity UI Toolkit development - UXML structure, USS styling, C# VisualElement manipulation, data binding, and custom controls. Use when implementing UI Toolkit interfaces.
76unity-test-runner
Execute and analyze Unity Test Framework tests from the command line. This skill automates test execution for Unity projects by detecting the Unity Editor, configuring test parameters (EditMode/PlayMode), running tests via CLI, parsing XML results, and generating detailed failure reports. Use this when running Unity tests, validating game logic, or debugging test failures.
64unity-compile-fixer
Detect and resolve Unity C# compilation errors using VSCode diagnostics. Use this skill when Unity projects have compilation errors that need diagnosis and automated fixes. Analyzes errors from VSCode Language Server, proposes solutions based on error patterns, and handles version control conflicts for Unity projects.
57unity scene optimizer
Analyzes scenes for performance bottlenecks (draw calls, batching, textures, GameObjects). Use when optimizing scenes or investigating performance issues.
45blender-toolkit
|
41unity template generator
Generates production-ready C# script templates (MonoBehaviour, ScriptableObject, Editor, tests). Use when creating new scripts or setting up project structure.
41