Unity performance

From TheArcForge/UniClaude · View interactive version

Unity performance is an AI agent skill from the GitHub repository TheArcForge/UniClaude. Use when you need detailed performance analysis — CPU/GPU/RAM cost models, optimization patterns, platform budgets, pooling, batching, and profiling strategies.

How to use this skill

Skill file

Unity Performance — Full Decision Framework

Use this when unity-architect's condensed performance section needs more depth.

Before Optimizing

Profile first. Never optimize based on assumptions.

Tools:

Rule: Identify the bottleneck, then optimize that specific thing. Optimizing the wrong thing is wasted effort.

CPU Cost Model

Expensive (avoid in hot paths):

Cheap:

GPU Cost Model

Draw calls (CPU→GPU overhead per rendered object):

Fill rate (per-pixel cost):

Shader complexity:

Memory Cost Model

Textures (usually largest):

Meshes:

Audio:

DECISION: Object Pooling

When to pool:

When NOT to pool:

Pool implementation checklist:

  1. Pre-warm during loading (not during gameplay).
  2. Get() → SetActive(true) + reset all state.
  3. Return() → SetActive(false) + clear references.
  4. Cap size — destroy overflow to prevent unbounded growth.
  5. Stack<T> (LIFO) for cache friendliness.

DECISION: Rendering Optimization

Static batching:

GPU Instancing:

SRP Batcher (URP/HDRP):

Sprite atlases:

DECISION: Physics Optimization

Collision matrix:

Collider choice:

Physics settings:

Related Skills

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.