profiler-frame-hierarchy
Retrieve the full Unity profiler call hierarchy tree for a specific frame to analyze per-function performance. Includes total time, self time, call counts, and GC allocations. Filter by thread, depth, and minimum time for targeted analysis.
Instructions
Retrieves the full profiler call hierarchy tree for a specific frame. Returns function names, total time, self time, call counts, and GC allocations in a tree structure — equivalent to the Unity Profiler Hierarchy view. Use this to analyze detailed per-function performance.
Input 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, 1 = Render Thread, etc. Default: 0 | 0 |
| maxDepth | No | Maximum depth of the call tree to return. Use smaller values for overview, larger values for detailed analysis. Default: 5 | 5 |
| minTotalMs | No | Minimum total time (ms) to include a node. Filters out insignificant calls. Default: 0.1 | 0.100000001 |