Intermediate

Complete reference for all 9 world and actor operations: spawn, move, delete, inspect, console commands, and viewport capture.

unreal_world

The unreal_world tool covers everything related to actors, levels, console commands, and the editor viewport. It exposes 9 operations for spawning, moving, deleting, and inspecting actors, plus utilities for running console commands and capturing screenshots.

Operations at a Glance

OperationHintDescription
spawn_actorSpawn any actor class at a given location and rotation
move_actoridempotentMove, rotate, or scale an actor by name
delete_actorsdestructiveDelete actors by name array or class filter
set_propertyidempotentSet any actor property via UE reflection
get_level_actorsreadOnlyList all actors in the current level with metadata
open_levelopenWorldOpen, create, save, or list levels
run_console_commandopenWorldExecute a console command (blocklist enforced)
capture_viewportreadOnlyTake a screenshot of the active viewport
get_output_logreadOnlyFetch recent lines from the editor output log

Warning: open_level, delete_actors, and run_console_command must always be called sequentially — never in parallel with other operations.

spawn_actor

Spawns an actor of any registered class into the current level. The actor appears immediately in the editor viewport.

Parameters

ParameterTypeRequiredDescription
class_pathstringyesFull UE class path, e.g. /Script/Engine.PointLight
namestringnoDisplay name for the new actor. Auto-generated if omitted.
locationobjectno{ x, y, z } in world units. Defaults to origin.
rotationobjectno{ pitch, yaw, roll } in degrees.
scaleobjectno{ x, y, z } scale multiplier. Defaults to 1,1,1.
{
  "operation": "spawn_actor",
  "params": {
    "class_path": "/Script/Engine.PointLight",
    "name": "FillLight_01",
    "location": { "x": 200, "y": -100, "z": 300 },
    "rotation": { "pitch": 0, "yaw": 0, "roll": 0 }
  }
}
{
  "operation": "spawn_actor",
  "params": {
    "class_path": "/Script/Engine.StaticMeshActor",
    "name": "Boulder_01",
    "location": { "x": 0, "y": 500, "z": 0 },
    "scale": { "x": 2.0, "y": 2.0, "z": 2.0 }
  }
}

Notes

  • class_path must be a fully qualified UE class path starting with /Script/ for engine classes or /Game/ for Blueprint classes.
  • Blueprint actors use the path format /Game/Blueprints/BP_MyActor.BP_MyActor_C.
  • The spawned actor's name must be unique within the level. If a name collision occurs, a numeric suffix is appended automatically.

move_actor

Moves, rotates, or scales an existing actor. You can set any combination of transform components in a single call.

Parameters

ParameterTypeRequiredDescription
namestringyesExact name of the actor to move
locationobjectnoNew { x, y, z } world position
rotationobjectnoNew { pitch, yaw, roll } in degrees
scaleobjectnoNew { x, y, z } scale
{
  "operation": "move_actor",
  "params": {
    "name": "FillLight_01",
    "location": { "x": 400, "y": -200, "z": 350 },
    "rotation": { "pitch": -45, "yaw": 90, "roll": 0 }
  }
}

Note: move_actor is idempotent — calling it twice with the same parameters produces the same result. It is safe to parallelize across different actor names.

delete_actors

Deletes one or more actors from the current level. Accepts a name list, a class filter, or both.

Parameters

ParameterTypeRequiredDescription
namesstring[]noArray of actor names to delete
class_filterstringnoDelete all actors of this class (e.g. PointLight)
confirmbooleannoMust be true to execute. Safety interlock.
{
  "operation": "delete_actors",
  "params": {
    "names": ["TempLight_01", "TempLight_02", "TempLight_03"],
    "confirm": true
  }
}
{
  "operation": "delete_actors",
  "params": {
    "class_filter": "PointLight",
    "confirm": true
  }
}

Warning: delete_actors is tagged destructiveHint. Deleted actors cannot be recovered through gengine — use Ctrl+Z in the editor immediately if you need to undo. The operation is capped at 200 actors per call to prevent accidental mass deletion.

set_property

Sets any actor property using Unreal Engine's reflection system. This works on any UPROPERTY-exposed field without requiring a custom tool.

Parameters

ParameterTypeRequiredDescription
actorstringyesName of the target actor
propertystringyesProperty name as it appears in UE reflection (case-sensitive)
valueanyyesNew value. Type must match the property type.
componentstringnoIf set, targets a named component on the actor instead of the actor itself
{
  "operation": "set_property",
  "params": {
    "actor": "FillLight_01",
    "property": "Intensity",
    "value": 5000.0
  }
}
{
  "operation": "set_property",
  "params": {
    "actor": "BP_Enemy_01",
    "property": "MaxHealth",
    "value": 250
  }
}
{
  "operation": "set_property",
  "params": {
    "actor": "PlayerStart_0",
    "component": "ArrowComponent",
    "property": "bHiddenInGame",
    "value": true
  }
}

Supported Value Types

  • Numeric: float, int32, int64 — pass as JSON numbers
  • Boolean: pass as true / false
  • String / FName / FText: pass as JSON string
  • Struct (FVector, FRotator, FLinearColor): pass as { "x": 0, "y": 0, "z": 0 } or { "r": 1, "g": 0, "b": 0, "a": 1 }
  • Object reference: pass the full asset path string

get_level_actors

Returns a list of all actors in the currently open level, with metadata for each.

Parameters

ParameterTypeRequiredDescription
class_filterstringnoOnly return actors of this class (partial match)
name_filterstringnoOnly return actors whose name contains this string
include_componentsbooleannoIf true, include component list for each actor
{
  "operation": "get_level_actors",
  "params": {
    "class_filter": "PointLight"
  }
}
{
  "operation": "get_level_actors",
  "params": {
    "name_filter": "BP_Enemy",
    "include_components": true
  }
}

Response Shape

{
  "actors": [
    {
      "name": "FillLight_01",
      "class": "PointLight",
      "location": { "x": 200, "y": -100, "z": 300 },
      "rotation": { "pitch": 0, "yaw": 0, "roll": 0 },
      "scale": { "x": 1, "y": 1, "z": 1 },
      "tags": [],
      "components": ["LightComponent0", "ArrowComponent"]
    }
  ],
  "total": 1
}

Note: get_level_actors is tagged readOnlyHint — safe to run in parallel with other read-only operations.

open_level

Opens, creates, saves, or lists levels. This is a high-impact operation that affects the entire editor session.

Parameters

ParameterTypeRequiredDescription
actionstringyesOne of: open, create, save, list
pathstringnoLevel asset path (required for open and create)
namestringnoNew level name (used with create)
{
  "operation": "open_level",
  "params": {
    "action": "open",
    "path": "/Game/Maps/L01_Dungeon"
  }
}
{
  "operation": "open_level",
  "params": {
    "action": "create",
    "path": "/Game/Maps/",
    "name": "L02_Village"
  }
}
{
  "operation": "open_level",
  "params": {
    "action": "list"
  }
}

Warning: open_level is tagged openWorldHint and must always run sequentially. Opening a level while other operations are in flight can cause state corruption or crashes.

run_console_command

Executes a console command in the editor. A blocklist prevents dangerous commands from running.

Parameters

ParameterTypeRequiredDescription
commandstringyesThe console command string to execute
{
  "operation": "run_console_command",
  "params": {
    "command": "r.SetRes 1920x1080"
  }
}
{
  "operation": "run_console_command",
  "params": {
    "command": "stat fps"
  }
}

Blocklisted Commands

The following command prefixes are always blocked regardless of safety tier:

  • quit, exit — would close the editor
  • RestartEditor — editor restart
  • open — level loading (use open_level instead)
  • disconnect, reconnect — network state
  • exec — arbitrary script execution
  • obj savepackage — raw package writes

Warning: run_console_command is tagged openWorldHint. Always run sequentially. Never parallelize with level-loading or actor-deletion operations.

capture_viewport

Takes a screenshot of the active editor viewport and saves it to disk.

Parameters

ParameterTypeRequiredDescription
resolutionstringnoOutput resolution, e.g. "1920x1080". Defaults to current viewport size.
filenamestringnoOutput filename without extension. Defaults to auto-generated timestamp.
show_uibooleannoIf true, includes editor UI overlays. Defaults to false.
{
  "operation": "capture_viewport",
  "params": {
    "resolution": "1920x1080",
    "filename": "lighting_test_01"
  }
}

Response

{
  "path": "C:/Users/.../Saved/Screenshots/lighting_test_01.png",
  "resolution": "1920x1080",
  "size_bytes": 2457600
}

Note: capture_viewport is tagged readOnlyHint — it does not modify editor state. Safe to parallelize for capturing multiple viewports in sequence.

get_output_log

Fetches recent lines from the Unreal Editor output log. Useful for reading compile errors, warnings, or custom log messages after an operation.

Parameters

ParameterTypeRequiredDescription
linesintegernoNumber of recent lines to return. Default: 100. Max: 1000.
filterstringnoOnly return lines containing this string (case-insensitive)
categorystringnoFilter by log category, e.g. LogBlueprint, LogTemp
{
  "operation": "get_output_log",
  "params": {
    "lines": 50,
    "category": "LogBlueprint"
  }
}
{
  "operation": "get_output_log",
  "params": {
    "lines": 200,
    "filter": "Error"
  }
}

Response

{
  "lines": [
    "[2025.01.15-14:32:07] LogBlueprint: Error: [BP_Enemy] Variable 'AggroRange' not found",
    "[2025.01.15-14:32:07] LogBlueprint: Warning: [BP_Enemy] Compile completed with 1 error"
  ],
  "total_returned": 2,
  "total_available": 4821
}

Common Patterns

Three-Point Lighting Rig

Spawn a key light, fill light, and rim light in one parallel batch, then adjust their intensities.

// Read-only operations are parallel-safe
// But spawn_actor modifies state — only parallelize on DIFFERENT actors
sequential([
  spawn_actor({ class_path: "/Script/Engine.DirectionalLight", name: "KeyLight", location: {x:500, y:0, z:400}, rotation: {pitch:-45, yaw:0, roll:0} }),
  spawn_actor({ class_path: "/Script/Engine.PointLight", name: "FillLight", location: {x:-300, y:200, z:200} }),
  spawn_actor({ class_path: "/Script/Engine.SpotLight", name: "RimLight", location: {x:0, y:-400, z:300} }),
])
// Now parallelize property sets on different actors
parallel([
  set_property({ actor: "KeyLight", property: "Intensity", value: 10.0 }),
  set_property({ actor: "FillLight", property: "Intensity", value: 3000.0 }),
  set_property({ actor: "RimLight", property: "Intensity", value: 5000.0 }),
])

Inspect Then Modify

Use get_level_actors to discover actors before modifying them.

// 1. Read — safe to run first
const result = await get_level_actors({ class_filter: "PointLight" })
// 2. Modify each discovered actor
for (const actor of result.actors) {
  await set_property({ actor: actor.name, property: "AttenuationRadius", value: 800 })
}

Batch Viewport Captures

Capture screenshots at multiple resolutions. capture_viewport is read-only and parallel-safe.

parallel([
  capture_viewport({ resolution: "3840x2160", filename: "hero_4k" }),
  capture_viewport({ resolution: "1920x1080", filename: "hero_1080p" }),
  capture_viewport({ resolution: "1280x720",  filename: "hero_720p" }),
])