editor.state
Editor state queries and actions (selection, world info, viewport, undo/redo)
editor.state.getSelection
Returns the currently selected actors in the level editor.
No parameters.
Returns
Array of objects:
| Field | Type | Description |
|---|---|---|
name | string | Actor display label |
class | string | Actor class name |
path | string | Full object path |
Example Request
{ "jsonrpc": "2.0", "id": 1, "method": "editor.state.getSelection" } Example Response
{
"jsonrpc": "2.0", "id": 1,
"result": [
{ "name": "Cube", "class": "StaticMeshActor", "path": "/Game/Maps/MyLevel.MyLevel:PersistentLevel.Cube" }
]
} editor.state.getOpenEditors
Returns all currently open asset editors.
No parameters.
Returns
Array of objects:
| Field | Type | Description |
|---|---|---|
name | string | Asset name |
type | string | Asset class name |
asset_path | string | Full asset path |
Example Request
{ "jsonrpc": "2.0", "id": 1, "method": "editor.state.getOpenEditors" } editor.state.getWorldInfo
Returns information about the current editor world.
No parameters.
Returns
| Field | Type | Description |
|---|---|---|
level_name | string | Current map name |
sub_levels | array | Streaming sub-levels (each with name, is_loaded) |
play_state | string | "stopped", "playing", or "simulating" |
Example Request
{ "jsonrpc": "2.0", "id": 1, "method": "editor.state.getWorldInfo" } Example Response
{
"jsonrpc": "2.0", "id": 1,
"result": { "level_name": "Lvl_FirstPerson", "sub_levels": [], "play_state": "stopped" }
} editor.state.getViewportState
Returns the active viewport's camera state.
No parameters.
Returns
| Field | Type | Description |
|---|---|---|
position | object | {x, y, z} camera location |
rotation | object | {pitch, yaw, roll} camera rotation |
view_mode_index | number | Numeric view mode index |
view_mode | string | Human-readable view mode name |
is_realtime | bool | Whether viewport is in realtime mode |
is_perspective | bool | Whether camera is perspective (vs orthographic) |
Example Request
{ "jsonrpc": "2.0", "id": 1, "method": "editor.state.getViewportState" } editor.state.getUndoStack
Returns the most recent undo history entries (up to 20).
No parameters.
Returns
Array of objects:
| Field | Type | Description |
|---|---|---|
title | string | Transaction description |
index | number | Position in undo queue |
is_undone | bool | Whether this entry has been undone |
Example Request
{ "jsonrpc": "2.0", "id": 1, "method": "editor.state.getUndoStack" } editor.state.getPlayState
Returns detailed PIE (Play-in-Editor) state information.
No parameters.
Returns
| Field | Type | Description |
|---|---|---|
play_state | string | "stopped", "playing", or "simulating" |
is_playing | bool | Whether a PIE session is active |
is_simulating | bool | Whether simulating in editor |
Example Request
{ "jsonrpc": "2.0", "id": 1, "method": "editor.state.getPlayState" } editor.state.getProjectInfo
Returns project and engine metadata.
No parameters.
Returns
| Field | Type | Description |
|---|---|---|
project_name | string | Current project name |
engine_version | string | Full engine version string |
project_dir | string | Project root directory |
project_content_dir | string | Project Content/ directory |
current_level | string | Currently loaded level name |
Example Request
{ "jsonrpc": "2.0", "id": 1, "method": "editor.state.getProjectInfo" } Example Response
{
"jsonrpc": "2.0", "id": 1,
"result": {
"project_name": "MyProject",
"engine_version": "5.7.2-0+++UE5+Release-5.7",
"project_dir": "../../../MyProject/",
"project_content_dir": "../../../MyProject/Content/",
"current_level": "Lvl_FirstPerson"
}
} editor.state.undo
Undoes the most recent undoable action.
No parameters.
Returns
| Field | Type | Description |
|---|---|---|
success | bool | Whether the undo was performed |
undone_action | string | Description of the undone transaction (present when success is true) |
reason | string | Why undo was not possible (present when success is false) |
Example Request
{ "jsonrpc": "2.0", "id": 1, "method": "editor.state.undo" } Example Response
{
"jsonrpc": "2.0", "id": 1,
"result": { "success": true, "undone_action": "AgentUX: Spawn Actor" }
} editor.state.redo
Redoes the most recently undone action.
No parameters.
Returns
| Field | Type | Description |
|---|---|---|
success | bool | Whether the redo was performed |
redone_action | string | Description of the redone transaction (present when success is true) |
reason | string | Why redo was not possible (present when success is false) |
Example Request
{ "jsonrpc": "2.0", "id": 1, "method": "editor.state.redo" } Example Response
{
"jsonrpc": "2.0", "id": 1,
"result": { "success": true, "redone_action": "AgentUX: Spawn Actor" }
} editor.state.openAssetEditor
Opens an asset editor for the specified asset. If the asset is already open, brings its editor to the foreground.
| Name | Type | Required | Description |
|---|---|---|---|
asset_path | string | Yes | Full UE asset path (e.g. /Game/Materials/M_Ground) |
Returns
| Field | Type | Description |
|---|---|---|
success | bool | Whether the editor was opened successfully |
asset_path | string | The asset path that was opened |
asset_name | string | The asset's short name |
asset_class | string | The asset's class name |
Example Request
{ "jsonrpc": "2.0", "id": 1, "method": "editor.state.openAssetEditor",
"params": { "asset_path": "/Game/Materials/M_Ground" } } Example Response
{
"jsonrpc": "2.0", "id": 1,
"result": {
"success": true,
"asset_path": "/Game/Materials/M_Ground",
"asset_name": "M_Ground",
"asset_class": "Material"
}
} editor.state.closeAssetEditor
Closes all editors currently open for the specified asset.
| Name | Type | Required | Description |
|---|---|---|---|
asset_path | string | Yes | Full UE asset path (e.g. /Game/Materials/M_Ground) |
Returns
| Field | Type | Description |
|---|---|---|
success | bool | Whether any editors were closed (false if none were open) |
editors_closed | number | Number of editor instances that were closed |
asset_path | string | The asset path that was closed |
Example Request
{ "jsonrpc": "2.0", "id": 1, "method": "editor.state.closeAssetEditor",
"params": { "asset_path": "/Game/Materials/M_Ground" } } Example Response
{
"jsonrpc": "2.0", "id": 1,
"result": {
"success": true,
"editors_closed": 1,
"asset_path": "/Game/Materials/M_Ground"
}
}