用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/Besty0728/Unity-Skills --skill unity-console命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Automate the Unity Editor through a local REST API — create and edit scripts, build scenes and prefabs, manage assets/materials/lighting, run tests, and drive hundreds of Editor operations across modules. Use when the user wants to actually operate the Unity Editor from chat — create or modify GameObjects/scripts/scenes/assets, batch-edit, or run Editor automation — in any language. Not needed for conceptual Unity Q&A that touches no Editor state — read the matching advisory doc under skills/ instead. 当用户要从对话里实际操作 Unity 编辑器(创建/修改/批量编辑/运行测试)时使用,任何语言均可触发;纯概念问答无需本协议。
Unified batch and async-job orchestration
Index of all Unity Skills modules with per-module mode labels (SA/FA/Mixed). Use to find which module covers a task before loading its doc.
基于 SOC 职业分类
正在显示 SKILL.md
| name | unity-console |
| description | Capture and query the Unity Editor console |
Before calling any skill in this module: if you are about to call a skill with parameters guessed from its name or description, STOP — read this file (or fetch its schema via
GET /skills/recommend?includeSchema=true) first. If you already have the parameter definitions from recommend/schema, you may proceed straight to dryRun.
Work with the Unity console - capture logs, write messages, and debug your project.
console_get_logs / console_get_stats,标 SkillMode.SemiAuto)直接执行;其余 skill(console_start_capture / console_stop_capture / console_clear / console_log / console_export / console_set_pause_on_error / console_set_collapse / console_set_clear_on_play,默认 SkillMode.FullAuto)需用户 grant,grant 后一步执行返结果。IsForbiddenInSemi 拦截,不需要 Bypass 才能跑的高危操作。DO NOT (common hallucinations):
console_filter does not exist → use console_get_logs with filter parameterconsole_read does not exist → use console_get_logsconsole_write does not exist → use console_logdebug_get_logs — console_get_logs reads captured buffer, debug_get_logs reads all console entriesRouting:
debug module's debug_check_compilationdebug module's debug_get_stack_traceconsole_set_collapse / console_set_clear_on_play (this module)| Skill | Description |
|---|---|
console_start_capture | Start capturing logs |
console_stop_capture | Stop capturing logs |
console_get_logs | Get captured logs |
console_clear | Clear console |
console_log | Write log message |
console_set_pause_on_error | Enable or disable Error Pause in Play mode |
console_export | Export console logs to a file |
console_get_stats | Get log statistics (count by type) |
console_set_collapse | Set console log collapse mode |
console_set_clear_on_play | Set clear on play mode |
Start capturing Unity console logs.
No parameters.
Stop capturing logs.
No parameters.
Get Unity Console logs (reads existing console history directly; if console_start_capture is active, returns captured buffer with timestamps instead).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
type | string | No | "All" | All / Error / Warning / Log |
filter | string | No | null | Substring content filter |
limit | int | No | 100 | Max results |
Returns (two shapes depending on mode):
console_start_capture active): {count, logs: [{type, message, time}], source: "capture"} — time formatted HH:mm:ss.fff{count, logs: [{type, message, file, line}], source: "console"} — type is Error / Warning / Log, file / line from Unity's LogEntryClear the Unity console.
No parameters.
Write a custom log message.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
message | string | Yes | - | Log message |
type | string | No | "Log" | Log/Warning/Error |
console_set_pause_on_errorEnable or disable Error Pause in Play mode.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
enabled | bool | No | true | Enable or disable error pause |
Returns: { success, enabled }
console_exportExport console logs to a file. Uses captured buffer when console_start_capture is active; otherwise reads directly from Unity Console history (no setup needed).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
savePath | string | No | "Assets/console_log.txt" | File path to save logs |
Returns: { success, path, count, source }
console_get_statsGet log statistics (count by type). Uses captured buffer when console_start_capture is active; otherwise reads directly from Unity Console history.
No parameters.
Returns (two shapes depending on mode):
console_start_capture was called or buffer is non-empty): {success, total, source: "capture", logs, warnings, errors, exceptions, asserts}{success, total, source: "console", logs, warnings, errors} — exceptions / asserts are not reported in direct mode (folded into errors)console_set_collapseSet console log collapse mode.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
enabled | bool | Yes | - | Enable or disable collapse mode |
Returns: { success, setting, enabled }
console_set_clear_on_playSet clear on play mode.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
enabled | bool | Yes | - | Enable or disable clear on play |
Returns: { success, setting, enabled }
import unity_skills
# Start capturing logs before play mode
unity_skills.call_skill("console_start_capture")
# Enter play mode
unity_skills.call_skill("editor_play")
# ... gameplay generates logs ...
unity_skills.call_skill("editor_stop")
# Get all captured logs
logs = unity_skills.call_skill("console_get_logs")
for log in logs['logs']:
print(f"[{log['type']}] {log['message']}")
# Get only errors
errors = unity_skills.call_skill("console_get_logs", type="Error")
if errors['count'] > 0:
print(f"Found {errors['count']} errors!")
# Write custom log
unity_skills.call_skill("console_log",
message="AI Agent: Task completed",
type="Log"
)
# Write warning
unity_skills.call_skill("console_log",
message="AI Agent: Performance issue detected",
type="Warning"
)
# Clear and stop
unity_skills.call_skill("console_clear")
unity_skills.call_skill("console_stop_capture")
Exact names, parameters, defaults, and returns are defined by GET /skills/schema or unity_skills.get_skill_schema(), not by this file.