editor.level

Level management (load, save, new, streaming)

← API Reference

editor.level.newBlankMap

Creates a new blank map, optionally saving the current one first.

Name Type Required Description
save_existingboolNoSave current map before creating new one (default false)

Returns

Field Type Description
successboolWhether map was created
map_namestringName of the new map

Example Request

{ "jsonrpc": "2.0", "id": 1, "method": "editor.level.newBlankMap", "params": { "save_existing": true } }

editor.level.open

Opens an existing map by content path.

Name Type Required Description
pathstringYesContent path (e.g. "/Game/Maps/MyMap")

Returns

Field Type Description
successboolWhether map was loaded
map_namestringLoaded map name

Example Request

{ "jsonrpc": "2.0", "id": 1, "method": "editor.level.open", "params": { "path": "/Game/Maps/MyMap" } }

editor.level.save

Saves the current level, optionally to a new path.

Name Type Required Description
pathstringNoSave-as path. If omitted, saves in place.

Returns

Field Type Description
successboolWhether save succeeded
map_namestringMap name

Example Request

{ "jsonrpc": "2.0", "id": 1, "method": "editor.level.save" }

editor.level.loadSubLevel

Adds a streaming sub-level to the current world.

Name Type Required Description
pathstringYesContent path to sub-level (e.g. "/Game/Maps/MySubLevel")

Returns

Field Type Description
successboolWhether sub-level was loaded
level_namestringPackage name of the loaded sub-level

Example Request

{ "jsonrpc": "2.0", "id": 1, "method": "editor.level.loadSubLevel", "params": { "path": "/Game/Maps/MySubLevel" } }

editor.level.getSubLevels

Returns all streaming sub-levels in the current world.

No parameters.

Returns

Field Type Description
persistent_levelstringName of the persistent level
countnumberNumber of streaming sub-levels
sub_levelsarrayEach: {name, is_loaded, is_visible, is_current}

Example Request

{ "jsonrpc": "2.0", "id": 1, "method": "editor.level.getSubLevels" }

Example Response

{
  "jsonrpc": "2.0", "id": 1,
  "result": { "persistent_level": "Lvl_Main", "count": 1, "sub_levels": [{ "name": "/Game/Maps/MySubLevel", "is_loaded": true, "is_visible": true, "is_current": false }] }
}

editor.level.removeSubLevel

Removes a streaming sub-level from the current world.

Name Type Required Description
namestringYesStreaming level package name (as returned by getSubLevels)

Returns

Field Type Description
successboolWhether removal succeeded

Example Request

{ "jsonrpc": "2.0", "id": 1, "method": "editor.level.removeSubLevel", "params": { "name": "/Game/Maps/MySubLevel" } }

editor.level.setCurrentLevel

Sets the active editing level. Use "persistent" for the persistent level, or a streaming level package name.

Name Type Required Description
namestringYesStreaming level package name, or "persistent" for the persistent level

Returns

Field Type Description
successboolWhether current level was changed
current_levelstringName of the newly current level

Example Request

{ "jsonrpc": "2.0", "id": 1, "method": "editor.level.setCurrentLevel", "params": { "name": "persistent" } }

Example Response

{
  "jsonrpc": "2.0", "id": 1,
  "result": { "success": true, "current_level": "Lvl_Main" }
}