profiler-get-memory-stats

Reads Unity Profiler memory counters and returns statistics in megabytes.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Unity developers need quick visibility into runtime memory usage—reserved, allocated, mono heap, and graphics memory—without manually opening the Profiler window or writing boilerplate code to query each counter. ## Core Features & Use Cases - Memory Snapshot Retrieval: Reads all scalar counters from UnityEngine.Profiling.Profiler, including total reserved, allocated, unused reserved, mono heap, temp allocator, graphics driver, and max used memory. - Automatic Unit Conversion: Converts every value from bytes to megabytes for immediate readability. - Use Case: While debugging a memory spike in a Unity play mode session, invoke this tool to instantly get a structured snapshot of all memory counters and identify whether the growth is in the mono heap, graphics memory, or native allocations. ## Quick Start Ask the AI to get the current Unity memory statistics snapshot to check how much memory the editor or play mode session is using.

Frequently Asked Questions about profiler-get-memory-stats

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

FAQPage Schema
How do I get Unity memory usage statistics programmatically?▼

Use UnityEngine.Profiling.Profiler APIs such as GetTotalReservedMemoryLong and GetTotalAllocatedMemoryLong to read memory counters. This tool queries all scalar counters at once and returns them converted to megabytes.

What memory metrics does the Unity Profiler API expose?▼

The Profiler API exposes total reserved memory, total allocated memory, unused reserved memory, mono heap size, mono used size, temp allocator size, graphics driver memory, max used memory, and used heap size.

Does this tool require any external Unity packages?▼

No, it uses only built-in Unity APIs from the UnityEngine.Profiling namespace. No additional packages or plugins need to be installed in the Unity project.

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

The CLI is not installed globally. Install it with npm install -g unity-mcp-cli, or prefix commands with npx unity-mcp-cli. Refer to the unity-initial-setup skill for detailed installation steps.

What are the limitations of Unity Profiler memory counters?▼

These counters provide scalar snapshots only and do not break down allocations by object type or call stack. For detailed allocation tracking, use the Unity Memory Profiler package or deep profiling in the Profiler window.