set_properties
Write editable properties of assets, CDOs, actors, or components in the editor world, with undoable changes, clamping, optional saving, and a report of what was set or failed.
Instructions
Write one or several editable properties of one object in the editor world, as the Details panel does: an asset, a CDO, a placed actor, one of its components ("Actor.Component") or an asset's sub-object. Each write is undoable, dirties the package and re-registers the component, and the reply lists what was set and what failed, with why.
Use it for any setting of a light, fog, sky, decal, camera, post-process volume, sound, Niagara system, material expression or other asset. Not for: a component in a live PIE world (set_component_property), a Blueprint's component template (set_blueprint_component_properties), a widget inside a Widget Blueprint (set_widget_property), or an object's own setter function (call_function).
Take the property names from get_object_info, and object_path from the tool that found the object: find_assets_by_name for an asset, get_graph_nodes for a graph node, or "Label.ComponentClass" for a placed actor, such as "Sun.DirectionalLightComponent". Example: {"object_path": "Sun.DirectionalLightComponent", "properties": {"Intensity": 10, "LightColor": {"R": 255, "G": 200, "B": 150}}} writes two properties; property_name "Intensity" with value 10 writes one, and both forms together write properties first. A struct takes only the fields to change: {"RelativeLocation": {"Z": 200}} keeps X and Y.
A name can also be a PATH, to write one value deep inside without rewriting what holds it: "RelativeLocation.Z", "Items[2]" or "Items[2].Name" (an existing element; to resize an array, write the whole array), and through an object reference to the object it points to, such as an instanced sub-object: "Layer.Settings.Size". The object holding the last segment is the one written, made undoable and notified with the chain of its segments, as the Details panel does for a nested edit; every segment it holds must be writable, and a reference the path goes through only needs to be visible.
A sub-object's asset is finished as its editor does it: a graph node is reconstructed and its Blueprint marked modified (compile it), a sound cue recaches, a Niagara system recompiles and a blend space is resampled; no Blueprint is compiled. clamp=true keeps numbers inside ClampMin/ClampMax and lists what it clamped. save=true saves an asset's package and is refused for an object in a level, which save_level writes. Refused before anything is written: a struct key that names no field, an unregistered gameplay tag, and any call during Play-in-Editor (see force).
Returns: { object_path: string, resolved_path: string, set: [string], failed: [{property, error}], owning_asset?: string (a sub-object's asset), finished?: [string] (what ran on that asset), clamped?: [string] ("name=value", with clamp), saved?: bool, save_error?: string (with save), success: bool }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| save | No | Save the asset's package after the writes (default false); refused, before anything is written, for an object in a level | |
| clamp | No | Clamp each number written to the ClampMin/ClampMax of its property, struct fields and array elements included (default false) | |
| force | No | Optional. This command is REFUSED while a Play-in-Editor session is running: it either compiles a Blueprint (the reinstancer can retain a world, and CheckForWorldGCLeaks is Fatal -- it KILLS the editor) or writes to disk (Editor.AllowSavingAssetsDuringPIE=0 makes the engine refuse the write, so it would report success without writing a byte). Stop PIE and retry instead; force=true runs it anyway, at your own risk. | |
| value | No | Optional new value for property_name: string, number, boolean, JSON object (struct), JSON array (array/set/tag container), or a UE-format text string like "(X=1,Y=2,Z=3)" | |
| properties | No | Optional dict of {property_name or path: value}; values can be scalar, nested object, or array (UE-format text like "(X=1,Y=2,Z=3)" is also accepted for structs). Required unless property_name + value is given; both together write properties{} first. | |
| object_path | Yes | The object, resolved in the EDITOR world: an asset path, a full object path, a CDO/archetype, an asset's sub-object as the readers give its object_path -- a graph node from get_graph_nodes, a sound cue node, a Niagara renderer or simulation stage, a PCG node's settings_path, a behavior tree node, a camera rig node, a Mass trait, a physics body -- also written "/Game/Asset:SubObject", or "Actor[.Component[.Subobject]]" where Actor is an internal name or a unique label and Component a component name or a class only one component has. | |
| property_name | No | Optional single property, or path such as "Items[2].Name", to write (must be CPF_Edit and not EditConst, or it lands in failed[] with the reason). Needs value. |