set_material_on_actor
Assign a material to a static mesh actor in the Unreal Editor level by specifying the actor name and material asset path. Use it to change an actor's appearance or update a specific material slot.
Instructions
Set a Material on a static mesh actor in the level.
This corresponds to the "Set Material" node used in Ch. 5 of the book, where the CylinderTarget changes its Material when hit.
Args: actor_name: Name of the actor in the level (e.g., "CylinderTarget") material_path: Asset path to the Material (e.g., "/Game/Materials/M_TargetRed") element_index: Material slot index (0 = first material slot)
KB: see knowledge_base/08_MATERIALS_AND_RENDERING.md#overview Example: set_material_on_actor(actor_name="ExampleName", material_path="/Game/MCP_Test/M_Example")
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| actor_name | Yes | ||
| element_index | No | ||
| material_path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |