Deprecated
Use CreateComponent that passes a parameters block instead
Module |
|
Header |
/Engine/Source/Runtime/Engine/Public/AudioDevice.h |
Include |
#include "AudioDevice.h" |
Source |
/Engine/Source/Runtime/Engine/Private/AudioDevice.cpp |
static UAudioComponent * CreateComponent
(
USoundBase * Sound,
UWorld * World,
AActor * Actor,
bool bPlay,
bool bStopWhenOwnerDestroyed,
const FVector * Location,
USoundAttenuation * AttenuationSettings,
USoundConcurrency * ConcurrencySettings
)
Creates an audio component to handle playing a sound. Plays a sound at the given location without creating an audio component.
The created audio component if the function successfully created one or a nullptr if not successful. Note: if audio is disabled or if there were no hardware audio devices available, this will return nullptr.
Parameter |
Description |
---|---|
Sound |
The USoundBase to play at the location. |
World |
The world this sound is playing in. |
AActor |
The optional actor with which to play the sound on. |
Play |
Whether or not to automatically call play on the audio component after it is created. |
bStopWhenOwnerDestroyed |
Whether or not to automatically stop the audio component if its owner is destroyed. |
Location |
The sound's location. |
AttenuationSettings |
The sound's attenuation settings to use. Will default to the USoundBase's AttenuationSettings if not specified. |
USoundConcurrency |
The sound's sound concurrency settings to use. Will use the USoundBase's USoundConcurrency if not specified. |