create_material_function
Creates a UMaterialFunction asset at a specified package path, exposes it to the function library, and saves it. Reuses an existing function if present.
Instructions
Create a UMaterialFunction asset at package_path/name through the editor factory, exposed to the function library, and save it. Idempotent: an existing function is returned untouched with already_exists=true; another asset class at that path is an error. Returns function_path, num_inputs, num_outputs and saved.
Returns: { function_path: string, name: string, package_path: string, description: string, num_inputs: number, num_outputs: number, created: bool, saved: bool, already_exists: bool? }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Asset name for the new material function | |
| description | No | Text stored as the function Description, the tooltip shown wherever the function is used; default empty. Ignored when the function already exists. | |
| package_path | Yes | /Game package directory, e.g. '/Game/MyGame' |