profiler
Start, stop, and analyze Unity profiling sessions to capture frame timing, memory snapshots, CPU usage, render stats, and GC allocations. Save and review performance data to identify bottlenecks.
Instructions
Controls Unity's Profiler for performance analysis. Actions:
start: Begin profiling session
stop: End profiling session
get_frame_data: Get detailed frame timing data
get_memory_snapshot: Capture memory usage snapshot
get_render_stats: Get rendering statistics (draw calls, triangles, batches)
get_cpu_usage: Get CPU time breakdown by area
get_gc_allocs: Get garbage collection allocations
save_report: Save profiler data to file
clear: Clear profiler data
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Profiler action to perform | |
| sortBy | No | Sort profiler results by this metric | |
| minTime | No | Minimum time in ms to include in results (filter small items) | |
| savePath | No | File path for saving profiler report | |
| frameCount | No | Number of frames to analyze (default: 1, max: 300) | |
| profileGPU | No | Include GPU profiling data | |
| deepProfile | No | Enable deep profiling for detailed call stacks (slower) | |
| profileEditor | No | Include editor overhead in profiling | |
| memoryCategories | No | Memory categories to include in snapshot | |
| includeCallStacks | No | Include call stacks in GC allocation data |