profiler-gc-alloc
Identify functions causing garbage collection allocations in Unity to reduce frame hitches by analyzing profiler data and call paths.
Instructions
Returns the top N functions with the highest GC (garbage collection) allocations in a profiler frame, including their call paths. GC allocations are a major source of frame hitches in Unity — use this to find and eliminate them.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| frameIndex | No | Frame index to analyze. Use -1 for the latest available frame. Default: -1 | -1 |
| threadIndex | No | Thread index. 0 = Main Thread. Default: 0 | 0 |
| topN | No | Number of top entries to return. Default: 20 | 20 |
| minBytes | No | Minimum GC allocation bytes to include. Filters out trivial allocations. Default: 0 | 0 |
| maxDepth | No | Maximum tree depth to scan. Default: 15 | 15 |