create_material_layer
Creates a UMaterialFunctionMaterialLayer asset at a content path for reusable material layers in Unreal Engine. Idempotent; returns asset details and save status.
Instructions
Creates a UMaterialFunctionMaterialLayer asset (usage MaterialLayer, exposed to the library) at package_path/name and saves it, like the editor factory. Idempotent: any material function already at that path is returned as is, whatever its class. Success even when the save fails: read saved and save_error.
Returns: { asset_path: string, name: string, class: string, usage: string, created: bool, already_existed: bool, saved: bool, save_error: string }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Asset name for the new material layer function | |
| package_path | Yes | Content folder starting with a slash, e.g. /Game/MyGame; a trailing slash is ignored |