profiler-frame-hierarchy
Analyze Unity performance by retrieving detailed profiler call hierarchy trees for specific frames to identify bottlenecks and optimize execution.
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
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, 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 |