set_material_instance_param
Set a global scalar, vector, texture, or static-switch parameter on a Material Instance Constant asset and re-read it to verify the change.
Instructions
Set a scalar, vector, texture or static-switch global parameter on a Material Instance Constant asset and re-read it: set comes from the re-read (the engine setter always returns false), plus value_after and overridden_after. Malformed vectors are rejected. Marks the package dirty; does not save.
Returns: { instance: string, instance_path: string, param_name: string, param_type: string, value_format?: string, set: bool, value_after: number|object|string|bool|null, overridden_after: bool, value_requested: number|object|string|bool, requested: {...} }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| value | No | Value. Scalar: a number (JSON number or numeric string). Vector: '(R=..,G=..,B=..,A=..)', '[r,g,b,a]', '[r,g,b]', 'r,g,b,a', 'r,g,b', or a real JSON array of 3-4 numbers; anything else is REJECTED (never written as black). Texture: an asset path. Static switch: a bool or 'true'/'false'. | |
| param_name | Yes | Parameter name as defined in the parent material, e.g. "BaseTint"; only global parameters are reached, not layer parameters. | |
| param_type | No | "scalar" | "vector" | "texture" | "static_switch" (optional, inferred from the value: a JSON array => vector, a JSON bool => static_switch, a JSON number => scalar, a string starting with '/' => texture, with '(' or '[' => vector, else scalar. A bool passed AS A STRING still reads as scalar, so pass param_type explicitly in that case) | |
| instance_path | Yes | Asset path of the UMaterialInstanceConstant, e.g. "/Game/Materials/MI_Rock". |