Operations
Entity Operations
CreateEntity
Create a new entity in the scene.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Entity name |
parent | string | No | GUID of parent entity (omit for root-level) |
guid | string | No | Specific GUID for the entity (for redo operations) |
{
"op": "CreateEntity",
"params": {
"name": "Player",
"parent": "00000000-0000-0000-0000-000000000001"
}
}
DeleteEntity
Remove an entity from the scene. The entity must have no children.
| Parameter | Type | Required | Description |
|---|---|---|---|
target | string | Yes | GUID of entity to delete |
{
"op": "DeleteEntity",
"params": {
"target": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
}
CloneEntity
Duplicate an entity with all its components. The clone gets a new GUID and an automatic position offset.
| Parameter | Type | Required | Description |
|---|---|---|---|
source_guid | string | Yes | GUID of entity to clone |
new_name | string | No | Name for the clone (default: source name + _Clone) |
offset | array | No | Position offset [x, y, z] (default: 1.5x entity scale on X axis) |
parent_guid | string | No | Parent for the clone (default: same as source) |
{
"op": "CloneEntity",
"params": {
"source_guid": "a1b2c3d4-...",
"new_name": "EnemyB",
"offset": [5, 0, 0]
}
}
ReparentEntity
Move an entity to a different parent in the hierarchy.
| Parameter | Type | Required | Description |
|---|---|---|---|
entity | string | Yes | GUID of entity to move |
new_parent | string | No | GUID of new parent (omit to move to root) |
{
"op": "ReparentEntity",
"params": {
"entity": "a1b2c3d4-...",
"new_parent": "e5f6a7b8-..."
}
}