Navigation
Unreal Engine C++ API Reference > Runtime > Engine > Kismet > UGameplayStatics
References
Module | Engine |
Header | /Engine/Source/Runtime/Engine/Classes/Kismet/GameplayStatics.h |
Include | #include "Kismet/GameplayStatics.h" |
Source | /Engine/Source/Runtime/Engine/Private/GameplayStatics.cpp |
static UAudioComponent &42; CreateSound2D
&40;
const UObject &42; WorldContextObject,
USoundBase &42; Sound,
float VolumeMultiplier,
float PitchMultiplier,
float StartTime,
USoundConcurrency &42; ConcurrencySettings,
bool bPersistAcrossLevelTransition,
bool bAutoDestroy
&41;
Remarks
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
Parameters
Name | 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 |