Bridge Commands Reference
Complete reference of all bridge commands available for Unity and Godot. These commands are executed by the AI Agent through the live HTTP bridge to the running editor.
Command format
Every bridge command follows this JSON structure:
{
"category": "scene",
"action": "create",
"params": {
"sceneName": "MainMenu"
}
}In batch mode, an array of commands is sent as a single request. All commands execute in one editor frame.
Unity commands
scene
| Action | Parameters | Returns |
|---|
getActive | none | Scene name and path |
getHierarchy | none | Full scene tree with transforms, components, canvas info |
create | sceneName | New blank scene (Camera + Light), project screen size |
open | scenePath | Loaded scene, project screen size, canvas reference resolution |
save | none | Save confirmation |
gameObject
| Action | Parameters | Returns |
|---|
create | name, parentPath? | Empty GameObject created |
createPrimitive | primitiveType, name?, parentPath? | Primitive (Cube, Sphere, Capsule, Cylinder, Plane, Quad) |
find | name | GameObject path and components |
destroy | name | Deletion confirmation |
setActive | name, active | Active state changed |
setTransform | name, position?, rotation?, scale? | Transform updated |
component
| Action | Parameters | Returns |
|---|
add | gameObjectName, componentType | Component added (auto-configures CanvasScaler) |
remove | gameObjectName, componentType | Component removed |
getAll | gameObjectName | List of all components |
setProperty | gameObjectName, componentType, propertyName, value | Property set (SmartConvert handles type conversion) |
prefab
| Action | Parameters | Returns |
|---|
create | gameObjectName, path | Prefab saved to disk |
instantiate | prefabPath, name?, parentPath? | Prefab instance created in scene |
getAll | none | List of all prefabs in the project |
asset
| Action | Parameters | Returns |
|---|
create | assetType, name, path?, properties? | Asset created (Material, PhysicMaterial) |
find | name, type? | Asset path and metadata |
import | sourcePath, destinationPath | Asset imported |
project
| Action | Parameters | Returns |
|---|
getInfo | none | Project name, Unity version, platform, default screen size |
refresh | none | Asset database refreshed |
editor
| Action | Parameters | Returns |
|---|
getPlayMode | none | Current play mode state |
play | none | Entered play mode |
pause | none | Paused play mode |
stop | none | Exited play mode |
getConsoleLogs | count? | Recent console log entries |
executeMenuItem | menuPath | Menu item executed |
getScreenInfo | none | Screen resolution, canvas reference resolution |
Godot commands
scene
| Action | Parameters | Returns |
|---|
getTree | none | Full node tree of the current scene |
create | sceneName, rootType? | New blank scene with chosen root type |
open | scenePath | Scene loaded |
save | none | Scene saved |
getActive | none | Current scene name and path |
node
| Action | Parameters | Returns |
|---|
create | type, name, parentPath | Node created (uses ClassDB.instantiate) |
delete | nodePath | Node deleted |
duplicate | nodePath, newName? | Node duplicated |
setProperty | nodePath, propertyName, value | Property set (supports resource objects) |
getProperties | nodePath | All properties of the node |
find | name | Node path |
reparent | nodePath, newParentPath | Node moved to new parent |
setTransform | nodePath, position?, rotation?, scale? | Transform updated |
script
| Action | Parameters | Returns |
|---|
attach | nodePath, scriptPath | GDScript attached to node |
detach | nodePath | Script removed from node |
resource
| Action | Parameters | Returns |
|---|
create | resourceType, properties?, savePath? | Resource created |
find | name, type? | Resource path |
editor
| Action | Parameters | Returns |
|---|
play | none | Game started |
stop | none | Game stopped |
pause | none | Game paused |
getState | none | Editor state (playing, paused, stopped) |
getScreenInfo | none | Viewport/screen resolution |
project
| Action | Parameters | Returns |
|---|
getInfo | none | Project name, Godot version, path |
scan | none | Filesystem rescanned |
Example: Creating a player in Godot
This batch creates a CharacterBody2D player with collision and a sprite:
[
{
"category": "node",
"action": "create",
"params": {
"type": "CharacterBody2D",
"name": "Player",
"parentPath": "World"
}
},
{
"category": "node",
"action": "create",
"params": {
"type": "CollisionShape2D",
"name": "CollisionShape2D",
"parentPath": "World/Player"
}
},
{
"category": "node",
"action": "setProperty",
"params": {
"nodePath": "World/Player/CollisionShape2D",
"propertyName": "shape",
"value": {
"resourceType": "RectangleShape2D",
"properties": { "size": [32, 64] }
}
}
},
{
"category": "node",
"action": "create",
"params": {
"type": "Sprite2D",
"name": "Sprite2D",
"parentPath": "World/Player"
}
},
{
"category": "script",
"action": "attach",
"params": {
"nodePath": "World/Player",
"scriptPath": "res://scripts/player.gd"
}
}
]Example: Creating a UI button in Unity
This batch creates a Canvas with a button:
[
{
"category": "gameObject",
"action": "create",
"params": { "name": "Canvas" }
},
{
"category": "component",
"action": "add",
"params": {
"gameObjectName": "Canvas",
"componentType": "Canvas"
}
},
{
"category": "component",
"action": "add",
"params": {
"gameObjectName": "Canvas",
"componentType": "CanvasScaler"
}
},
{
"category": "gameObject",
"action": "create",
"params": {
"name": "PlayButton",
"parentPath": "Canvas"
}
},
{
"category": "component",
"action": "add",
"params": {
"gameObjectName": "Canvas/PlayButton",
"componentType": "UnityEngine.UI.Button"
}
}
]