unity-performance

Analyze Unity projects for hot paths, allocations, and inefficient patterns.

8|1|Updated Oct 7, 2025
One-click install
npx skills add https://github.com/Zzulin/unity-project01 --skill unity-performance-zzulin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-performance
Source: https://github.com/Zzulin/unity-project01/tree/main/URP1/Plugins/Unity-Skills-main/SkillsForUnity/unity-skills~/skills/performance
Command: npx skills add https://github.com/Zzulin/unity-project01 --skill unity-performance-zzulin

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps identify Unity performance issues by surfacing red flags in your code and project setup, enabling faster, targeted optimizations.

Core Features & Use Cases

  • Detect hot paths in Update/LateUpdate/FixedUpdate and suggest optimizations
  • Flag expensive lookups like Find, GetComponent, Camera.main, or tag lookups in hot paths
  • Recommend pooling for Instantiate/Destroy and reduce per-frame allocations (LINQ, string formatting, closures, boxing)
  • Warn about excessive editor-only helpers leaking into runtime, and mismatched cadences for physics, animation, or UI updates
  • Use Case: during profiling sessions, code reviews, or pre-release checks to improve frame time and GC behavior

Quick Start

Run a Unity project performance check and output the red flags with recommended changes.

Frequently Asked Questions about unity-performance

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

FAQPage Schema
How do I identify Unity performance bottlenecks in my Update loops?

Reduce per-frame allocations in Unity by replacing Instantiate and Destroy calls with object pooling, and eliminate LINQ, string formatting, closures, and boxing to significantly improve garbage collection behavior.

How do I reduce per-frame allocations and garbage collection spikes in Unity?

Reduce per-frame allocations in Unity by replacing Instantiate and Destroy calls with object pooling, and eliminate LINQ, string formatting, closures, and boxing to significantly improve garbage collection behavior.

What are common Unity performance red flags during code reviews?

Common Unity performance red flags include expensive Find calls and Camera.main lookups in hot paths, mismatched cadences for physics and UI updates, and editor-only helpers accidentally leaking into runtime builds.

Can I use this to check Unity build configurations for runtime issues?

Yes, you can apply performance checks directly to Unity runtime scenes and build configurations to detect mismatched physics cadences, UI update inefficiencies, and editor-only helpers leaking into production.

When should I avoid using Camera.main and GetComponent in Unity hot paths?

Avoid using Camera.main and GetComponent in Unity hot paths like Update loops because they trigger expensive per-frame lookups that degrade frame time, requiring caching or optimized alternatives to resolve.

Why is object pooling recommended for Unity performance optimization?

Object pooling is recommended for Unity performance optimization because it prevents excessive Instantiate and Destroy calls, directly reducing per-frame allocations and minimizing garbage collection spikes during runtime.