Change a property LIVE in the user's open R3 editor
r3_editor_setThe same tool as r3_component_set (this is its older name): change properties of a component, kept at once in the project's live copy: every R3 tab with the project open shows it now, no editor needed and nothing to save.
Name the component with componentId or entityRef. values take r3_component_set's shapes: a plain value {"roughness": 0.25}; a value component as an object of the keys to change {"position": {"y": 2}} (an EMPTY slot, e.g. a rigid body's centerOfMass, is made from the fields given: {"centerOfMass": {"z": -0.3, "mass": 8}}); a reference as the target's entityRef {"material": "material_cube_1"} (null clears it); a list of references as an array of entityRefs (it REPLACES the list). All-or-nothing: an unknown name is refused with the valid ones. A Code component's code is r3_editor_code's.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| values | Yes | What to set: {"visible": false, "position": {"y": 2}, "material": "material_cube_1"}. | |
| entityRef | No | Or its entityRef, e.g. "mesh_cube_1". | |
| projectId | Yes | The project (r3_project_list). | |
| componentId | No | The component's id (r3_project_load / r3_editor_inspect). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seq | No | ||
| live | Yes | ||
| type | Yes | ||
| saved | Yes | ||
| answer | Yes | This answer in words: what was done, what R3 measured, decided or refused, and what to do next. The same text as the result's text block. Read it: the fields beside it are the data, this is the guidance. | |
| editor | Yes | ||
| landed | Yes | ||
| changes | Yes | ||
| entityRef | Yes | ||
| projectId | Yes | ||
| componentId | Yes |