Module |
|
Header |
/Engine/Source/Runtime/Engine/Classes/Kismet/GameplayStatics.h |
Include |
#include "Kismet/GameplayStatics.h" |
Source |
/Engine/Source/Runtime/Engine/Private/GameplayStatics.cpp |
static UAudioComponent * CreateSound2D
(
const UObject * WorldContextObject,
USoundBase * Sound,
float VolumeMultiplier,
float PitchMultiplier,
float StartTime,
USoundConcurrency * ConcurrencySettings,
bool bPersistAcrossLevelTransition,
bool bAutoDestroy
)
This function allows users to create Audio Components in advance of playback with settings specifically for non-spatialized, non-distance-attenuated sounds. Audio Components created using this function by default will not have Spatialization applied.
An audio component to manipulate the created sound
Parameter |
Description |
---|---|
Sound |
Sound to create. |
VolumeMultiplier |
A linear scalar multiplied with the volume, in order to make the sound louder or softer. |
PitchMultiplier |
A linear scalar multiplied with the pitch. |
StartTime |
How far into the sound to begin playback at |
ConcurrencySettings |
Override concurrency settings package to play sound with |
PersistAcrossLevelTransition |
Whether the sound should continue to play when the map it was played in is unloaded |
bAutoDestroy |
Whether the returned audio component will be automatically cleaned up when the sound finishes (by completing or stopping), or whether it can be reactivated |