General
PromptBeginner5 minmarkdown
<h1 align="center">
<a href="https://prompts.chat">
5
A REST API server for controlling Unity Editor via HTTP. Perfect for AI agents, automation scripts, CI/CD pipelines, and external tools.
Sign in to like and favorite skills
A REST API server for controlling Unity Editor via HTTP. Perfect for AI agents, automation scripts, CI/CD pipelines, and external tools.
com.fubz.unity-editor-api folder to your project's Packages/ directoryAdd to your
Packages/manifest.json:
{ "dependencies": { "com.fubz.unity-editor-api": "https://github.com/YOUR_USERNAME/unity-editor-api.git" } }
openupm add com.fubz.unity-editor-api
The server starts automatically when Unity opens. Access it at
http://localhost:8091.
# Check if server is running curl http://localhost:8091/api/help # Get console logs curl "http://localhost:8091/api/logs?type=error&limit=10" # Enter play mode curl -X POST http://localhost:8091/api/playmode -d '{"action":"play"}' # Load a scene curl -X POST http://localhost:8091/api/scene/load -d '{"path":"Assets/Scenes/Main.unity"}'
| Endpoint | Method | Description |
|---|---|---|
| GET | API documentation |
| GET | Console logs (type: error|warning|log) |
| Endpoint | Method | Body | Description |
|---|---|---|---|
| GET | - | Check play mode state |
| POST | | Control play mode |
| Endpoint | Method | Body | Description |
|---|---|---|---|
| GET | - | List all scenes in project |
| GET | - | Get current scene info |
| POST | | Load a scene |
| GET | - | Get scene hierarchy |
| Endpoint | Method | Body | Description |
|---|---|---|---|
| POST | - | Trigger script recompilation |
| POST | | Save scene/project |
| POST | | Execute menu item |
| POST | | Select GameObject |
| GET | - | Get project info |
Access settings via Tools > Editor API > Open Settings
This package includes a ready-to-use skill file for Claude Code.
Copy the skill to your project's
.claude/skills/ folder:
# From your Unity project root mkdir -p .claude/skills/unity-editor-api cp Packages/com.fubz.unity-editor-api/ClaudeCode/SKILL.md .claude/skills/unity-editor-api/
Or symlink it:
mkdir -p .claude/skills ln -s ../../Packages/com.fubz.unity-editor-api/ClaudeCode .claude/skills/unity-editor-api
With this skill, Claude Code can:
All endpoints return JSON:
// Success {"success": true, "data": ...} // Error {"error": "Description of what went wrong"}
MIT