Razorbill
Operations

Component Operations

AddComponent

Attach a component to an entity with optional initial data.

ParameterTypeRequiredDescription
component_typestringYesComponent type name (e.g., "Transform", "Rigidbody")
entity_guidstringNoTarget entity GUID (use this OR entity_name)
entity_namestringNoTarget entity name (for entities created in same transaction)
dataobjectNoInitial component data as JSON
{
  "op": "AddComponent",
  "params": {
    "entity_name": "Player",
    "component_type": "Rigidbody",
    "data": {
      "mass": 70.0,
      "is_kinematic": false
    }
  }
}

Available Component Types

Core: Transform, CameraComponent Rendering: MeshComponent, SkinnedMeshComponent, PBRMaterialComponent, UnlitMaterial Physics: Rigidbody, Collider, CharacterController Lighting: DirectionalLightComponent, PointLightComponent Scripting: ScriptComponent Animation: AnimatorComponent, JointComponent UI: UICanvasComponent, UIRectTransformComponent, UITextComponent, UIImageComponent, UIButtonComponent, UIPanelComponent, UISliderComponent, UIToggleComponent, UIProgressBarComponent, UIInputFieldComponent, UIDropdownComponent, UILayoutGroupComponent, UILayoutElementComponent World: TerrainComponent


RemoveComponent

Remove a component from an entity.

ParameterTypeRequiredDescription
component_typestringYesComponent type name to remove
entitystringYesEntity GUID
{
  "op": "RemoveComponent",
  "params": {
    "entity": "a1b2c3d4-...",
    "component_type": "Rigidbody"
  }
}

SetProperty

Modify a specific property on a component. Uses JSON Pointer syntax for nested paths.

ParameterTypeRequiredDescription
component_typestringYesComponent type containing the property
property_pathstringYesJSON Pointer to the property (e.g., /position/x, /color)
valueanyYesNew value (type must match the property)
entity_guidstringNoTarget entity GUID (use this OR entity_name)
entity_namestringNoTarget entity name

Examples

Set a single axis:

{
  "op": "SetProperty",
  "params": {
    "entity_name": "Player",
    "component_type": "Transform",
    "property_path": "/position/y",
    "value": 10.0
  }
}

Set entire position:

{
  "op": "SetProperty",
  "params": {
    "entity_name": "Player",
    "component_type": "Transform",
    "property_path": "/position",
    "value": { "x": 0, "y": 10, "z": -5 }
  }
}

Change light color:

{
  "op": "SetProperty",
  "params": {
    "entity_name": "SunLight",
    "component_type": "DirectionalLightComponent",
    "property_path": "/color",
    "value": { "x": 1.0, "y": 0.8, "z": 0.6 }
  }
}

Toggle visibility:

{
  "op": "SetProperty",
  "params": {
    "entity_name": "SecretDoor",
    "component_type": "MeshComponent",
    "property_path": "/visible",
    "value": false
  }
}

On this page