apply_material_to_blueprint
Assign a material asset to a Blueprint component template slot. Use it to set persistent materials on SCS nodes without compiling or saving; read back with get_blueprint_material_info.
Instructions
Assign a material ASSET to one slot of a Blueprint component TEMPLATE (an OWN SCS node, not a placed actor) -- the persistent counterpart of set_mesh_material_color, which only builds a runtime dynamic instance. Does NOT compile and does NOT save. Actors ALREADY placed in a level keep their serialized material: change the template and the placed instances stay as they were.
Returns: { blueprint_name: string, component_name: string, material_path: string, material_slot: int, success: bool } -- an echo: success:true only means the material loaded and SetMaterial was called. Read it back with get_blueprint_material_info.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| 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. | |
| material_path | Yes | Asset path of the UMaterialInterface (material or material instance) to assign; a path that does not load is an error | |
| material_slot | No | Optional material slot index; defaults to 0. It is not range-checked against the mesh's slot count. | |
| blueprint_name | No | Name of the blueprint | |
| blueprint_path | No | Alias of `blueprint_name` (same value, same meaning). Accepted because sibling tools spell this parameter differently; prefer `blueprint_name`. | |
| component_name | Yes | Name of an OWN SCS component; must be a UPrimitiveComponent |