add_collection_scalar_param
Add a new scalar parameter to a Material Parameter Collection asset and save it, or overwrite the default on an existing scalar of that name.
Instructions
Add a scalar parameter (new GUID) to a Material Parameter Collection asset and save it; an existing scalar of that name only gets its default overwritten (already_existed=true). Returns scalar_count_before, scalar_count, default_value and id. For a color use add_collection_vector_param.
Returns: { collection_path: string, param_name: string, param_type: string, param_added: bool, already_existed: bool, scalar_count_before: int, scalar_count: int, default_value: number, id: string, saved: bool }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| param_name | Yes | Name of the new scalar parameter | |
| default_value | No | Default float value; default 0. An existing scalar of that name gets this value too, even when it is omitted | |
| collection_path | Yes | Full /Game path to the MPC asset |