Unity Script Validator
Installation
SKILL.md
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.