Profiling Tools In Unity

Last Updated : 6 May, 2026

Profiling measures how long each part of your game takes to run. It helps you find what's slowing down your game instead of guessing.

  • Shows which functions take the most time.
  • Identifies memory leaks.
  • Helps optimize the right things.
Profiler-In-Unity
Profiler In Unity

Opening the Profiler

Method 1: Window - Analysis - Profiler.

Method 2: Ctrl + 7 (Windows) / Cmd + 7 (Mac).

Opening-the-Profiler-In-Unity
Opening the Profiler In Unity

Profiler Window Overview

The Profiler has several sections:

  • CPU Usage: Time in scripts, physics, rendering.
  • GPU Usage: Graphics processing time.
  • Rendering: Draw calls, batches, triangles.
  • Memory: RAM usage & garbage collection.
  • Audio: Sound performance.
  • Physics: 3D & 2D physics time.
Profiler-Window-In-Unity
Profiler Tools In Unity

Finding the Bottleneck

Click on a spike in the graph. Below, see exactly what caused it. Common spikes:

  • Scripts: Your code taking too long (optimize!).
  • Physics: Too many rigidbodies or complex collisions.
  • Rendering: Too many draw calls.
  • Garbage Collector: Too many Instantiate/Destroy calls.

Using Profile in Build (Test on Real Device)

Sometimes problems only happen in actual build, not Editor.

  • File - Build Settings.
  • Check "Development Build" and "Autoconnect Profiler".
  • Build and run on device.
  • Profiler automatically connects.

Memory Profiler

Find memory leaks (memory that keeps growing).

  • Window -> Analysis -> Memory Profiler (install if needed).
  • Take snapshots at different times.
  • Compare snapshots to see what's not being freed.

Common memory issues:

  • Not destroying objects.
  • Event listeners not unsubscribed.
  • Large textures not compressed.

Common Problems and Fixes

ProblemWhat Profiler ShowsFix
Frame spikesGarbage Collector spikesUse object pooling
Slow scriptsYour method taking timeOptimize that method
Low FPSHigh rendering usageReduce draw calls
StutterPhysics spikesReduce rigidbodies
Comment
Article Tags:

Explore