editor.actor

Actor manipulation (spawn, destroy, transform, properties)

← API Reference

editor.actor.spawn

Spawns a new actor of the given class in the editor world.

Parameters:

Name Type Required Description
classstringYesActor class name (e.g. "StaticMeshActor", "PointLight")
locationobjectNo{x, y, z} spawn location (default 0,0,0)
rotationobjectNo{pitch, yaw, roll} spawn rotation (default 0,0,0)

Returns:

Name Type Description
successboolWhether spawn succeeded
namestringActor display label
classstringActual class name
pathstringFull object path

Example Request:

{
  "jsonrpc": "2.0", "id": 1, "method": "editor.actor.spawn",
  "params": { "class": "PointLight", "location": { "x": 100, "y": 0, "z": 200 } }
}

Example Response:

{
  "jsonrpc": "2.0", "id": 1,
  "result": { "success": true, "name": "PointLight", "class": "PointLight", "path": "/Game/Maps/Level.Level:PersistentLevel.PointLight_0" }
}

editor.actor.destroy

Destroys an actor by its object path.

Parameters:

Name Type Required Description
pathstringYesFull actor object path

Returns:

Name Type Description
successboolWhether destruction succeeded

Example Request:

{ "jsonrpc": "2.0", "id": 1, "method": "editor.actor.destroy", "params": { "path": "/Game/Maps/Level.Level:PersistentLevel.PointLight_0" } }

editor.actor.select

Selects an actor by path, optionally adding to existing selection.

Parameters:

Name Type Required Description
pathstringYesFull actor object path
add_to_selectionboolNoIf true, add to selection instead of replacing (default false)

Returns:

Name Type Description
successboolWhether selection succeeded
namestringActor display label
pathstringActor path

Example Request:

{ "jsonrpc": "2.0", "id": 1, "method": "editor.actor.select", "params": { "path": "/Game/Maps/Level.Level:PersistentLevel.Cube" } }

editor.actor.selectAll

Selects all actors in the current level.

No parameters.

Returns:

Name Type Description
successboolAlways true
countnumberNumber of actors selected

Example Request:

{ "jsonrpc": "2.0", "id": 1, "method": "editor.actor.selectAll" }

editor.actor.deselectAll

Clears the actor selection.

No parameters.

Returns:

Name Type Description
successboolAlways true

Example Request:

{ "jsonrpc": "2.0", "id": 1, "method": "editor.actor.deselectAll" }

editor.actor.getTransform

Returns the world transform (location, rotation, scale) of an actor.

Parameters:

Name Type Required Description
pathstringYesFull actor object path

Returns:

Name Type Description
locationobject{x, y, z}
rotationobject{pitch, yaw, roll}
scaleobject{x, y, z}
namestringActor display label

Example Request:

{ "jsonrpc": "2.0", "id": 1, "method": "editor.actor.getTransform", "params": { "path": "/Game/Maps/Level.Level:PersistentLevel.Cube" } }

editor.actor.setTransform

Sets the location, rotation, and/or scale of an actor. Only provided fields are changed.

Parameters:

Name Type Required Description
pathstringYesFull actor object path
locationobjectNo{x, y, z} new location
rotationobjectNo{pitch, yaw, roll} new rotation
scaleobjectNo{x, y, z} new scale

Returns:

Name Type Description
successboolWhether transform was applied
namestringActor display label

Example Request:

{
  "jsonrpc": "2.0", "id": 1, "method": "editor.actor.setTransform",
  "params": { "path": "/Game/Maps/Level.Level:PersistentLevel.Cube", "location": { "x": 500, "y": 0, "z": 100 } }
}

editor.actor.getProperties

Returns UProperty values for an actor.

Parameters:

Name Type Required Description
pathstringYesFull actor object path
editable_onlyboolNoOnly return EditAnywhere/VisibleAnywhere properties (default true)

Returns:

Name Type Description
actorstringActor display label
classstringActor class name
countnumberNumber of properties returned
propertiesarrayEach: {name, type, value}

Example Request:

{ "jsonrpc": "2.0", "id": 1, "method": "editor.actor.getProperties", "params": { "path": "/Game/Maps/Level.Level:PersistentLevel.Cube" } }

editor.actor.setProperty

Sets a single UProperty value on an actor using UE text import format.

Parameters:

Name Type Required Description
pathstringYesFull actor object path
propertystringYesProperty name
valuestringYesValue in UE text format (e.g. "(R=1.0,G=0.0,B=0.0,A=1.0)")

Returns:

Name Type Description
successboolWhether property was set
propertystringProperty name
valuestringValue that was set

Example Request:

{
  "jsonrpc": "2.0", "id": 1, "method": "editor.actor.setProperty",
  "params": { "path": "/Game/Maps/Level.Level:PersistentLevel.PointLight_0", "property": "Intensity", "value": "5000.0" }
}

editor.actor.duplicate

Duplicates an actor, optionally with a position offset.

Parameters:

Name Type Required Description
pathstringYesFull actor object path
offsetobjectNo{x, y, z} offset from original (default 0,0,0)

Returns:

Name Type Description
successboolWhether duplication succeeded
namestringDuplicated actor display label
classstringDuplicated actor class name
pathstringFull object path of the new actor

Example Request:

{
  "jsonrpc": "2.0", "id": 1, "method": "editor.actor.duplicate",
  "params": { "path": "/Game/Maps/Level.Level:PersistentLevel.Cube", "offset": { "x": 200, "y": 0, "z": 0 } }
}

editor.actor.getComponents

Returns all components attached to an actor.

Parameters:

Name Type Required Description
pathstringYesFull actor object path

Returns:

Name Type Description
actorstringActor display label
countnumberNumber of components
componentsarrayEach: {name, class, is_scene_component, relative_location?, is_root?}

Example Request:

{ "jsonrpc": "2.0", "id": 1, "method": "editor.actor.getComponents", "params": { "path": "/Game/Maps/Level.Level:PersistentLevel.Cube" } }

editor.actor.addComponent

Adds a new component of the specified class to an actor.

Parameters:

Name Type Required Description
pathstringYesFull actor object path
classstringYesComponent class name (e.g. "PointLightComponent", "AudioComponent")

Returns:

Name Type Description
successboolWhether component was added
namestringNew component instance name
classstringComponent class name

Example Request:

{
  "jsonrpc": "2.0", "id": 1, "method": "editor.actor.addComponent",
  "params": { "path": "/Game/Maps/Level.Level:PersistentLevel.Cube", "class": "PointLightComponent" }
}