unity-performance

Diagnose Unity performance red flags in C# projects and runtime behavior.

Updated Apr 15, 2026
One-click install
npx skills add https://github.com/Yuan-Zzzz/FrogRE --skill unity-performance-yuan-zzzz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-performance
Source: https://github.com/Yuan-Zzzz/FrogRE/tree/main/.codex/skills/unity-skills/skills/performance
Command: npx skills add https://github.com/Yuan-Zzzz/FrogRE --skill unity-performance-yuan-zzzz

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Identifies likely Unity performance issues that cause slowdowns, frame drops, or excessive garbage collection by focusing on high-signal red flags rather than speculative micro-optimizations. Helps developers prioritize fixes that will improve frame time, reduce GC spikes, and improve scalability without recommending risky large refactors.

Core Features & Use Cases

  • Hot-path detection: Spot too many Update/LateUpdate/FixedUpdate loops and other per-frame hot paths.
  • Allocation and GC analysis: Identify avoidable per-frame allocations (LINQ, string formatting, closures, boxing) and GC pressure.
  • Expensive calls and patterns: Detect repeated Find/GetComponent/Camera.main/tag lookups, reflection in hot paths, and Instantiate/Destroy churn suitable for pooling.
  • System-level mismatches: Flag physics, animation, or UI updates running at the wrong cadence or editor-only helpers leaking into runtime.
  • Use Case: Game engineers troubleshooting frame drops in a Unity scene can run this check to get a concise list of confirmed red flags, likely causes, and prioritized, low-risk fixes.

Quick Start

Run a Unity performance review on my project focusing on Update hot paths, allocations, pooling opportunities, and GC spikes, and return confirmed red flags, likely causes, prioritized fixes, and expected gains.

Frequently Asked Questions about unity-performance

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

FAQPage Schema
How do I find Unity performance red flags causing frame drops and GC spikes?

To find Unity performance red flags, analyze C# project code and runtime behavior to detect per-frame allocations, repeated GetComponent calls, and inefficient Update loops. This diagnostic process returns confirmed red flags, likely causes, and prioritized low-risk fixes to reduce GC spikes and improve frame time.

What causes high garbage collection pressure in Unity per-frame Update loops?

High garbage collection pressure in Unity Update loops is caused by avoidable per-frame allocations such as LINQ queries, string formatting, closures, and boxing. Detecting these allocation patterns helps identify hot paths and recommend low-allocation alternatives to prevent frame drops.

Can I use this approach to detect expensive Instantiate and Destroy churn in Unity?

Yes, you can detect excessive Instantiate and Destroy churn by identifying runtime instantiation patterns suitable for object pooling. This analysis flags object lifecycle hot paths and recommends pooling patterns to reduce CPU overhead and minimize garbage collection spikes.

Does this Unity performance review work for both editor and build environments?

Yes, this Unity performance review works for both editor and build environments by diagnosing frame drops, high CPU or GPU usage, and inefficient physics, animation, or UI hot paths. It identifies editor-only helpers leaking into runtime and flags system-level mismatches running at wrong cadences.

What is the best way to diagnose repeated Camera.main and tag lookups in Unity?

The best way to diagnose repeated Camera.main and tag lookups is to scan Unity C# code for expensive calls in hot paths. This detection identifies costly runtime lookups and recommends caching strategies with expected gains in frame time and reduced CPU usage.

Why does runtime reflection cause performance issues in Unity hot paths?

Runtime reflection causes performance issues in Unity hot paths by introducing significant CPU overhead during frequent per-frame execution. Detecting reflection in Update loops allows developers to replace it with direct calls or cached delegates, yielding measurable improvements in frame time.