Razorbill
Operations

Operations Overview

Operations are the only way to mutate project data in Razorbill. Every operation validates its inputs, applies changes atomically, and produces a structured diff with undo support.

How Operations Work

Operations are submitted as JSON, either individually or as a transaction (array of operations):

[
  { "op": "CreateEntity", "params": { "name": "Player" } },
  { "op": "AddComponent", "params": { "entity_name": "Player", "component_type": "Transform" } }
]

If any operation in a transaction fails, the entire transaction is rolled back.

Applying Operations

Via CLI

./build/toolchain/cli/eng_cli apply-plan ~/MyProject plan.json --json

Via AI Agent

./build/toolchain/cli/eng_cli agent ~/MyProject Main \
  --prompt "Create a red cube at position 0,3,0"

Via Editor

Operations are applied through the editor UI and AI chat panel.

Categories

Entity

Create, delete, clone, and reparent entities. Full reference →

OperationDescription
CreateEntityCreate a new entity with optional parent
DeleteEntityRemove an entity from the scene
CloneEntityDuplicate an entity with all components
ReparentEntityMove an entity to a different parent

Component

Add, remove, and modify components on entities. Full reference →

OperationDescription
AddComponentAttach a component to an entity
RemoveComponentRemove a component from an entity
SetPropertyModify a property value on a component

Asset

Create primitives, materials, and import external assets. Full reference →

OperationDescription
CreatePrimitiveGenerate a cube, sphere, plane, or cylinder mesh
CreatePBRMaterialApply a PBR material to an entity
ImportMeshImport a glTF/glb mesh file
ImportTextureImport an image as a texture asset

Lighting

Create lights and apply lighting presets. Full reference →

OperationDescription
CreateDirectionalLightCreate a sun/moon directional light
CreatePointLightCreate an omnidirectional point light
ApplyLightingPresetApply a predefined lighting setup

Script

Create, write, attach, and compile scripts. Full reference →

OperationDescription
CreateScriptCreate a new C++ script file
WriteScriptContentWrite code to a script file
AttachScriptAttach a script to an entity
DetachScriptRemove a script from an entity
CompileScriptsCompile scripts to dynamic libraries

UI

Create UI canvases and elements. Full reference →

OperationDescription
CreateUICanvasCreate a UI canvas (root of UI hierarchy)
AddUIElementAdd a UI widget element to a canvas

Prefab

Create and instantiate reusable prefabs. Full reference →

OperationDescription
CreatePrefabSave an entity as a reusable prefab
InstantiatePrefabCreate entities from a prefab

World

Generate terrain and multi-chunk worlds. Full reference →

OperationDescription
CreateTerrainGenerate procedural terrain
CreateWorldGenerate a tiled world with multiple chunks

Entity Targeting

Many operations accept either entity_guid or entity_name:

  • Use entity_guid when referencing existing entities with known GUIDs
  • Use entity_name when referencing entities created in the same transaction
[
  { "op": "CreateEntity", "params": { "name": "Bullet" } },
  { "op": "AddComponent", "params": {
    "entity_name": "Bullet",
    "component_type": "Rigidbody"
  }}
]

On this page