create_sound_source_bus
Create or load a USoundSourceBus asset, write its channel, duration, and audio bus routing fields, then save it. All inputs are validated before any change.
Instructions
Creates a USoundSourceBus asset at package_path/name, or loads the one already there, writes its routing fields and saves it; another asset class at the path is an error. source_bus_channels and duration, when omitted, take the defaults (Stereo, 1.0 s) on a new asset and keep their value on an existing one, whose fields the given values overwrite. Every value is validated before any asset is created or loaded, so an invalid one leaves nothing behind. audio_bus_path, when given, must load as a UAudioBus and becomes the bus whose audio this source bus plays; when omitted that field is left as is. Edit later with set_sound_source_bus_audio_bus or set_sound_source_bus_send_info; read with get_sound_source_bus.
Returns: { name: string, package_path: string, asset_path: string, asset_class: string, source_bus_channels: string, duration: float, audio_bus_path: string, audio_bus_class: string, applied_channels: bool, applied_duration: bool (each true when this call wrote the field: given, or the default on a new asset), applied_audio_bus: bool, created: bool, already_exists: bool, saved: bool, save_error?: string }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name of the new Sound Source Bus asset | |
| duration | No | Duration in seconds, at least 0 (0.0 means indefinite); a negative value is an error. Default 1.0 on a new asset only. | |
| package_path | No | Target content path, defaults to /Game/Audio | |
| audio_bus_path | No | Optional full content path of a UAudioBus to assign as the AudioBus return. | |
| source_bus_channels | No | ESourceBusChannels: 'Mono' | 'Stereo' (default). USoundSourceBus inherits only Mono/Stereo. The default applies to a new asset only. |