editor.datalayer.getAll
Returns all data layers with complete state and visibility information.
No parameters.
Returns:
| Name | Type | Description |
|---|---|---|
layers | array | Each: {layer_name, full_name, asset_name, runtime_state, effective_runtime_state, initial_runtime_state, is_initially_visible, is_visible, layer_type, is_runtime, parent_name} |
count | number | Number of data layers |
Example Request:
{ "jsonrpc": "2.0", "id": 1, "method": "editor.datalayer.getAll" } editor.datalayer.getState
Returns the current state and visibility of a specific data layer.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
layer_name | string | Yes | Data layer name |
Returns:
| Name | Type | Description |
|---|---|---|
layer_name | string | Layer name |
runtime_state | string | "unloaded", "loaded", or "activated" |
effective_runtime_state | string | Effective state (considering hierarchy) |
initial_runtime_state | string | Initial runtime state |
is_visible | bool | Whether layer is visible |
is_runtime | bool | Whether layer is a runtime layer |
layer_type | string | "runtime" or "editor" |
Example Request:
{ "jsonrpc": "2.0", "id": 1, "method": "editor.datalayer.getState", "params": { "layer_name": "Gameplay" } } editor.datalayer.setState
Sets the initial runtime state of a data layer.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
layer_name | string | Yes | Data layer name |
state | string | Yes | "unloaded", "loaded", or "activated" |
recursive | bool | No | Apply to child layers (default false) |
Returns:
| Name | Type | Description |
|---|---|---|
success | bool | Whether state was set |
layer_name | string | Layer name |
new_state | string | New state |
Example Request:
{ "jsonrpc": "2.0", "id": 1, "method": "editor.datalayer.setState", "params": { "layer_name": "Gameplay", "state": "activated" } } editor.datalayer.getActors
Returns all actors assigned to a specific data layer.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
layer_name | string | Yes | Data layer name |
Returns:
| Name | Type | Description |
|---|---|---|
actors | array | Each: {actor_name, actor_class} |
count | number | Number of actors |
Example Request:
{ "jsonrpc": "2.0", "id": 1, "method": "editor.datalayer.getActors", "params": { "layer_name": "Gameplay" } }