create_audio_bus
Create or load a UAudioBus asset at a target path, save it, and optionally set its channel layout for Unreal audio routing.
Instructions
Creates a UAudioBus asset at package_path/name and saves it, or loads the one already there (already_exists true) and saves it again; another asset class at that path is an error. channels, when given, sets the channel layout, overwriting an existing bus's layout; when omitted a new bus gets Stereo and an existing one keeps its own. An invalid channels value is refused before any asset is created or loaded. Change the layout later with set_audio_bus_channels and read it with get_audio_bus; create_sound_source_bus makes a source bus that plays this bus's audio.
Returns: { name: string, package_path: string, asset_path: string, asset_class: string, channels: string, channels_int: int, num_channels: int, applied_channels: bool (this call wrote the layout: channels given, or the Stereo default on a new bus), created: bool, already_exists: bool, saved: bool, save_error?: string }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name of the new Audio Bus asset | |
| channels | No | EAudioBusChannels: 'Mono' | 'Stereo' (default) | 'Quad' | 'FiveDotOne' | 'SevenDotOne'. The default applies to a new bus only. | |
| package_path | No | Target content path, defaults to /Game/Audio |