unity-performance

Detect Unity hot paths, per-frame allocations, and API misuses.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Unity games often suffer from frame drops and CPU/GPU bottlenecks due to hot Update loops, excessive allocations, and misused APIs. This skill provides a focused, high-signal review to identify red flags and guide targeted optimizations without diving into speculative micro-optimizations.

Core Features & Use Cases

  • Detects common Unity hot path patterns (Update/FixedUpdate/LateUpdate proliferation), expensive Lookups (Find, GetComponent, Camera.main), and mis-timed updates in physics or UI.
  • Advises on pooling, object lifecycles, and per-frame allocations to reduce GC pressure.
  • Use Case: a project with intermittent framerate drops during gameplay; apply this skill to surface likely culprits and suggested fixes with prioritization.

Quick Start

Analyze the project's script patterns and profiler data to identify the top 3 hot paths causing frame time spikes.

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 bottlenecks causing frame drops?

To find Unity performance bottlenecks, analyze script patterns and profiler data to identify hot paths like Update-heavy loops and expensive API lookups. This focused review surfaces top culprits causing frame time spikes without speculative micro-optimizations.

What causes high GC pressure in Unity games?

High GC pressure in Unity games is caused by per-frame allocations and mismanaged object lifecycles. Analyzing code for hot paths and applying object pooling reduces these allocations, directly mitigating garbage collection spikes and frame drops.

How do I optimize Unity Update loops for better frame time?

Optimize Unity Update loops by detecting hot path patterns in Update, FixedUpdate, and LateUpdate. Replacing expensive lookups like GetComponent and Camera.main with cached references reduces frame time spikes and improves runtime performance.

When should I use object pooling in Unity?

Use object pooling in Unity to manage object lifecycles and eliminate per-frame allocations. Applying pooling within hot paths reduces GC pressure and stabilizes frame time during gameplay by reusing instances instead of instantiating new ones.

Why does Camera.main cause performance issues in Unity?

Camera.main causes performance issues in Unity because it performs an expensive internal lookup every call. Detecting this misuse within hot paths allows you to cache the reference, eliminating repeated expensive searches and reducing frame time.

Can this skill analyze physics updates for frame time spikes?

Yes, this skill can analyze physics updates for frame time spikes by detecting mis-timed updates within FixedUpdate loops. It identifies these hot paths and advises on optimizing physics interactions to stabilize overall gameplay framerate.