profiler-get-script-stats

Captures Unity frame timing and Mono/GC memory usage via built-in profiling APIs.

Updated May 20, 2026
One-click install
npx skills add https://github.com/Alltwice/Unity-3D-Project --skill profiler-get-script-stats-alltwice
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: profiler-get-script-stats
Source: https://github.com/Alltwice/Unity-3D-Project/tree/main/.agents/skills/profiler-get-script-stats
Command: npx skills add https://github.com/Alltwice/Unity-3D-Project --skill profiler-get-script-stats-alltwice

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires unity-mcp-cli.

What problem does it solve? When diagnosing performance issues in a Unity project, developers need quick access to frame timing and memory metrics without manually instrumenting code or opening the Profiler window. This Skill returns a structured snapshot of script execution timing and memory usage in a single call. ## Core Features & Use Cases - Frame Timing Snapshot: Returns frame time in milliseconds, fixed delta time, time scale, total frame count, and realtime since startup from UnityEngine.Time. - Memory Metrics: Reports Mono heap usage via Profiler.GetMonoUsedSizeLong and total GC memory via System.GC.GetTotalMemory, both in megabytes. - Use Case: While playtesting a scene that stutters, call this tool to check whether frame time spikes correlate with rising Mono memory, indicating garbage collection pressure. ## Quick Start Ask the AI to run the profiler-get-script-stats tool through unity-mcp-cli to get the current frame timing and memory usage of the running Unity project.

Frequently Asked Questions about profiler-get-script-stats

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I get Unity frame time and memory usage programmatically?▼

Run the profiler-get-script-stats tool via unity-mcp-cli to retrieve Time.deltaTime, Time.frameCount, Profiler.GetMonoUsedSizeLong, and GC.GetTotalMemory in one structured JSON response. All values come from built-in Unity APIs with no custom instrumentation needed.

What metrics does Unity script stats profiling return?▼

It returns frame time in milliseconds, fixed delta time, time scale, total frame count, realtime since startup in seconds, Mono memory usage in MB, and GC total memory in MB. These cover both timing and managed memory dimensions.

Does this Unity profiler tool require any input parameters?▼

No required inputs are needed. The input schema accepts an optional unused string field, so you can invoke the tool with an empty or minimal JSON object and still receive the full statistics snapshot.

Why is unity-mcp-cli not found when running the tool?▼

The CLI must be installed globally with npm install -g unity-mcp-cli, or invoked through npx unity-mcp-cli. Refer to the unity-initial-setup skill for detailed installation and configuration instructions.

What are the limitations of Mono memory profiling in Unity?▼

Profiler.GetMonoUsedSizeLong reports only the managed Mono heap currently in use, not total reserved memory or native allocations. GC.GetTotalMemory(false) reflects managed memory without forcing a collection, so values may include uncollected garbage.