set_material_usage_flag
Enable or disable a UMaterial usage flag, save the change, and recompile shaders for the affected usage.
Instructions
Enable or disable a usage flag (EMaterialUsage) on a UMaterial asset and persist it to disk. Idempotent: the engine setter no-ops when the flag already matches (already_set=true). Recompiles shaders for the affected usage.
Returns: { material_path: string, usage: string, enabled: bool, already_set: bool, saved: bool, save_error?: string, success: bool }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| usage | Yes | Usage flag name, with or without the MATUSAGE_ prefix (e.g., 'SkeletalMesh' or 'MATUSAGE_SkeletalMesh') | |
| enabled | No | Whether to enable (true, default) or disable (false) the flag | |
| material_path | Yes | Full path to the material (e.g., '/Game/Materials/MyMaterial.MyMaterial') |