add_metasound_graph_input
Add a typed input to an existing MetaSound Source, optionally with a baked default, then save the asset in an undo transaction; use it to expose new graph parameters.
Instructions
Add a graph input of data_type (default Float) to an existing MetaSound Source through the MetaSound builder, inside an undo transaction, then save the asset. Optionally bakes a typed default into the new input; give at most one of default_value, int_value, bool_value or string_value (bool_value wins, then int_value, string_value, default_value). An unregistered data_type or a source that does not load is an error. A name already used by an input is left untouched: with the same data_type the call succeeds with added=false and already_exists=true, saves nothing and does not apply a supplied default (note says so; use metasound_set_input_default); with another data_type it is an error. success is false, with save_error, when the save fails (during PIE, for one). Inverse: remove_metasound_graph_input.
Returns: { asset_path: string, input_name: string, data_type: string, added: bool, already_exists?: bool, has_default: bool, note?: string, saved: bool, save_error: string? }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data_type | No | Frontend data type: "Float", "Int32", "Bool", "String", "Audio", "Trigger" (optional, default "Float") | |
| int_value | No | Int32 default baked into the literal (optional, mutually exclusive with other defaults) | |
| bool_value | No | Bool default baked into the literal (optional, mutually exclusive with other defaults) | |
| input_name | Yes | Name of the graph input node to add. | |
| string_value | No | String default baked into the literal (optional, mutually exclusive with other defaults) | |
| default_value | No | Float default baked into the literal (optional) | |
| metasound_path | Yes | Asset path of the MetaSound Source, as a package path like "/Game/MetaSounds/MS_Example" or an object path like "/Game/MetaSounds/MS_Example.MS_Example" |