Agent SkillsIvanMurzak/Unity-MCP › profiler-capture-frame

profiler-capture-frame

GitHub

用于捕获Unity游戏当前帧的性能数据快照,包括FPS、帧耗时及运行时间等指标。适用于游戏性能监控和运行时状态分析。

Unity-MCP-Plugin/.claude/skills/profiler-capture-frame/SKILL.md IvanMurzak/Unity-MCP

Trigger Scenarios

需要获取Unity当前帧的FPS或延迟信息 检查游戏运行时的帧计数和启动时间

Install

npx skills add IvanMurzak/Unity-MCP --skill profiler-capture-frame -g -y
More Options

Non-standard path

npx skills add https://github.com/IvanMurzak/Unity-MCP/tree/main/Unity-MCP-Plugin/.claude/skills/profiler-capture-frame -g -y

Use without installing

npx skills use IvanMurzak/Unity-MCP@profiler-capture-frame

指定 Agent (Claude Code)

npx skills add IvanMurzak/Unity-MCP --skill profiler-capture-frame -a claude-code -g -y

安装 repo 全部 skill

npx skills add IvanMurzak/Unity-MCP --all -g -y

预览 repo 内 skill

npx skills add IvanMurzak/Unity-MCP --list

SKILL.md

Frontmatter
{
    "name": "profiler-capture-frame",
    "description": "Capture the current frame's timing info (delta time, FPS, frame counts, runtime). Snapshot only — historical frames live in Unity's Profiler window."
}

Profiler / Capture Frame

Reads UnityEngine.Time fields and returns them in a single struct. This tool is intentionally a single-frame snapshot — Unity's runtime API does not expose historical frame-data outside the Profiler window.

Fields

  • FrameTimeMsTime.deltaTime * 1000f.
  • Fps1 / Time.deltaTime (0 when delta is zero).
  • TotalFrameCountTime.frameCount (includes skipped renders).
  • RealtimeSinceStartupTime.realtimeSinceStartup.
  • RenderedFrameCountTime.renderedFrameCount.

Behavior

Uses only built-in Unity APIs (UnityEngine.Time). No external Unity package is required.

How to Call

unity-mcp-cli run-tool profiler-capture-frame --input '{
  "nothing": "string_value"
}'

For complex input (multi-line strings, code), save the JSON to a file and use:

unity-mcp-cli run-tool profiler-capture-frame --input-file args.json

Or pipe via stdin (recommended):

unity-mcp-cli run-tool profiler-capture-frame --input-file - <<'EOF'
{"param": "value"}
EOF

Troubleshooting

If unity-mcp-cli is not found, either install it globally (npm install -g unity-mcp-cli) or use npx unity-mcp-cli instead. Read the /unity-initial-setup skill for detailed installation instructions.

Input

Name Type Required Description
nothing string No

Input JSON Schema

{
  "type": "object",
  "properties": {
    "nothing": {
      "type": "string"
    }
  }
}

Output

Output JSON Schema

{
  "type": "object",
  "properties": {
    "result": {
      "$ref": "#/$defs/com.IvanMurzak.Unity.MCP.Editor.API.Tool_Profiler-FrameCaptureData",
      "description": "Single-frame snapshot of timing information from UnityEngine.Time. No historical frame data; use the Profiler window for that."
    }
  },
  "$defs": {
    "com.IvanMurzak.Unity.MCP.Editor.API.Tool_Profiler-FrameCaptureData": {
      "type": "object",
      "properties": {
        "FrameTimeMs": {
          "type": "number",
          "description": "Time.deltaTime in milliseconds at the moment of capture."
        },
        "Fps": {
          "type": "number",
          "description": "Frames per second derived from Time.deltaTime."
        },
        "TotalFrameCount": {
          "type": "integer",
          "description": "Total frame count since application start (Time.frameCount). May include skipped renders."
        },
        "RealtimeSinceStartup": {
          "type": "number",
          "description": "Time.realtimeSinceStartup, in seconds."
        },
        "RenderedFrameCount": {
          "type": "integer",
          "description": "Frames actually rendered (Time.renderedFrameCount)."
        }
      },
      "required": [
        "FrameTimeMs",
        "Fps",
        "TotalFrameCount",
        "RealtimeSinceStartup",
        "RenderedFrameCount"
      ],
      "description": "Single-frame snapshot of timing information from UnityEngine.Time. No historical frame data; use the Profiler window for that."
    }
  },
  "required": [
    "result"
  ]
}

Version History

  • 0.86.1 Current 2026-07-25 08:51

Same Skill Collection

.claude/skills/build-cli/SKILL.md
.claude/skills/github-pr-review-fix/SKILL.md
Unity-MCP-Plugin/.claude/skills/assets-copy/SKILL.md
Unity-MCP-Plugin/.claude/skills/assets-create-folder/SKILL.md
Unity-MCP-Plugin/.claude/skills/assets-delete/SKILL.md
Unity-MCP-Plugin/.claude/skills/assets-find-built-in/SKILL.md
Unity-MCP-Plugin/.claude/skills/assets-find/SKILL.md
Unity-MCP-Plugin/.claude/skills/assets-get-data/SKILL.md
Unity-MCP-Plugin/.claude/skills/assets-material-create/SKILL.md
Unity-MCP-Plugin/.claude/skills/assets-modify/SKILL.md
Unity-MCP-Plugin/.claude/skills/assets-move/SKILL.md
Unity-MCP-Plugin/.claude/skills/assets-prefab-close/SKILL.md
Unity-MCP-Plugin/.claude/skills/assets-prefab-create/SKILL.md
Unity-MCP-Plugin/.claude/skills/assets-prefab-instantiate/SKILL.md
Unity-MCP-Plugin/.claude/skills/assets-prefab-open/SKILL.md
Unity-MCP-Plugin/.claude/skills/assets-prefab-save/SKILL.md
Unity-MCP-Plugin/.claude/skills/assets-refresh/SKILL.md
Unity-MCP-Plugin/.claude/skills/assets-shader-get-data/SKILL.md
Unity-MCP-Plugin/.claude/skills/assets-shader-list-all/SKILL.md
Unity-MCP-Plugin/.claude/skills/console-clear-logs/SKILL.md
Unity-MCP-Plugin/.claude/skills/console-get-logs/SKILL.md
Unity-MCP-Plugin/.claude/skills/editor-application-get-state/SKILL.md
Unity-MCP-Plugin/.claude/skills/editor-application-set-state/SKILL.md
Unity-MCP-Plugin/.claude/skills/editor-selection-get/SKILL.md
Unity-MCP-Plugin/.claude/skills/editor-selection-set/SKILL.md
Unity-MCP-Plugin/.claude/skills/gameobject-component-add/SKILL.md
Unity-MCP-Plugin/.claude/skills/gameobject-component-destroy/SKILL.md
Unity-MCP-Plugin/.claude/skills/gameobject-component-get/SKILL.md
Unity-MCP-Plugin/.claude/skills/gameobject-component-list-all/SKILL.md
Unity-MCP-Plugin/.claude/skills/gameobject-component-modify/SKILL.md
Unity-MCP-Plugin/.claude/skills/gameobject-create/SKILL.md
Unity-MCP-Plugin/.claude/skills/gameobject-destroy/SKILL.md
Unity-MCP-Plugin/.claude/skills/gameobject-duplicate/SKILL.md
Unity-MCP-Plugin/.claude/skills/gameobject-find/SKILL.md
Unity-MCP-Plugin/.claude/skills/gameobject-modify/SKILL.md
Unity-MCP-Plugin/.claude/skills/gameobject-set-parent/SKILL.md
Unity-MCP-Plugin/.claude/skills/object-get-data/SKILL.md
Unity-MCP-Plugin/.claude/skills/object-modify/SKILL.md
Unity-MCP-Plugin/.claude/skills/package-add/SKILL.md
Unity-MCP-Plugin/.claude/skills/package-list/SKILL.md
Unity-MCP-Plugin/.claude/skills/package-remove/SKILL.md
Unity-MCP-Plugin/.claude/skills/package-search/SKILL.md
Unity-MCP-Plugin/.claude/skills/ping/SKILL.md
Unity-MCP-Plugin/.claude/skills/profiler-clear-data/SKILL.md
Unity-MCP-Plugin/.claude/skills/profiler-enable-module/SKILL.md
Unity-MCP-Plugin/.claude/skills/profiler-get-memory-stats/SKILL.md
Unity-MCP-Plugin/.claude/skills/profiler-get-rendering-stats/SKILL.md
Unity-MCP-Plugin/.claude/skills/profiler-get-script-stats/SKILL.md
Unity-MCP-Plugin/.claude/skills/profiler-get-status/SKILL.md

Metadata

Files
0
Version
0.88.0
Hash
3335295d
Indexed
2026-07-25 08:51

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-20 07:01
浙ICP备14020137号-1 $mapa de visitantes$