Godot Editor Bridge
Live two-way communication between EngineForge and a running Godot Editor instance via HTTP REST. The bridge enables the AI Agent to create nodes, attach scripts, manage resources, and control the editor remotely.
How it works
- When the IDE detects a Godot project (via
project.godot), it auto-deploys a GDScript plugin toaddons/gamedev_ide_bridge/ - The plugin is a
@tool EditorPlugin that starts an HTTP server on ports 27050–27060 - The plugin writes a discovery file to
.godot/gamedev_ide/bridge.json with the active port - The IDE polls this file every 5 seconds to discover the Godot instance
- Once discovered, all communication happens via HTTP request/response
First-time setup
Unlike Unity, Godot requires you to manually enable the plugin once:
- Open your project in Godot Editor
- Go to Project → Project Settings → Plugins
- Find “GameDev IDE Bridge” and check Enable
After enabling, the plugin loads automatically on every subsequent editor launch. The port range (27050–27060) is separate from Unity's range (26742–26752) to avoid conflicts when both editors are running.
HTTP endpoints
| Method | Path | Purpose |
|---|
| GET | /status | Health check |
| POST | /command | Execute a single command |
| POST | /batch | Execute an array of commands |
| GET | /events | Drain buffered events |
Command categories
Scene
| Action | Description |
|---|
getTree | Get the full node tree of the current scene |
create | Create a new blank scene |
open | Open an existing .tscn file |
save | Save the current scene |
getActive | Get the currently open scene info |
Node
| Action | Description |
|---|
create | Create a node with a given type, name, and parent path |
delete | Delete a node by path |
duplicate | Duplicate a node |
setProperty | Set a property value on a node |
getProperties | Get all properties of a node |
find | Find a node by name or path |
reparent | Move a node to a new parent |
setTransform | Set position, rotation, and scale |
Script
| Action | Description |
|---|
attach | Attach a GDScript file to a node |
detach | Remove the script from a node |
Resource
| Action | Description |
|---|
create | Create a resource (e.g. Material) |
find | Find a resource by path |
Editor
| Action | Description |
|---|
play | Start the game |
stop | Stop the game |
pause | Pause the running game |
getState | Check editor state (playing, paused, stopped) |
getScreenInfo | Get viewport/screen resolution info |
Project
| Action | Description |
|---|
getInfo | Get project name, Godot version, and path |
scan | Rescan the project filesystem |
Key differences from Unity
| Concept | Unity | Godot |
|---|
| Object model | GameObject + Components | Node tree (type is the node itself) |
| Script attachment | Added as a component | Attached directly to a node |
| Scene creation | Camera + Light auto-added | Root node type chosen by the AI |
| Undo support | Via Undo.RegisterCreatedObjectUndo | Via EditorUndoRedoManager |
| Plugin setup | Fully automatic | One-time manual enable required |
| Port range | 26742–26752 | 27050–27060 |
Smart features
Undo/Redo support
All mutations go through Godot's EditorUndoRedoManager, so every bridge command can be undone with Ctrl+Z in the editor.
Node ownership
Nodes created via the bridge automatically getnode.owner = edited_scene_root set, ensuring they persist when the scene is saved.
Type instantiation
Node types are resolved via ClassDB.instantiate(). Any built-in Godot node type (Sprite2D, CharacterBody2D, Camera2D, Label, etc.) can be created. Unknown types fall back to a plain Node.
Physics rules
These are critical rules the AI follows when creating physics-based scenes in Godot:
- Every CollisionShape2D must have a shape resource assigned. Creating a CollisionShape2D without setting its
shape property results in a non-functional collision shape. - Shape sizes use full dimensions, not half-extents. A RectangleShape2D with
size: [40, 80] is 40 pixels wide and 80 pixels tall. - For CapsuleShape2D, set height before radius. This is a Godot constraint: height must be ≥ 2 × radius.
- Every physics body needs a CollisionShape2D childwith a shape assigned:
CharacterBody2D (Player)
├── CollisionShape2D (must have shape!)
└── Sprite2D or ColorRect
Scene workflows
Creating a new scene
- Write any scripts needed (GDScript files)
- Call
editor.getScreenInfo to get viewport dimensions - Call
scene.create to create a blank scene - Create all nodes in a single batch for efficiency
- Attach scripts to nodes
- Call
scene.save
Modifying an existing scene
- Call
scene.getTree to see the current node structure - Review what exists before making changes
- Add, modify, or remove nodes as needed
- Call
scene.save
Timeouts
| Setting | Value |
|---|
| Single command timeout | 15 seconds |
| Batch timeout | 60 seconds |
| Discovery poll interval | 5 seconds |
| Event poll interval | 2 seconds |