Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/UGameplayStatics
Description
This function allows users to create Audio Components with settings specifically for non-spatialized, non-distance-attenuated sounds. Audio Components created using this function by default will not have Spatialization applied. Sound instances will begin playing upon spawning this Audio Component.
- Not Replicated.
| Name | SpawnSound2D |
| Type | function |
| Header File | /Engine/Source/Runtime/Engine/Classes/Kismet/GameplayStatics.h |
| Include Path | #include "Kismet/GameplayStatics.h" |
| Source | /Engine/Source/Runtime/Engine/Private/GameplayStatics.cpp |
UFUNCTION (BlueprintCallable, BlueprintCosmetic, Category="Audio",
Meta=(WorldContext="WorldContextObject", AdvancedDisplay="2", UnsafeDuringActorConstruction="true", Keywords="play"))
static UAudioComponent * SpawnSound2D
(
const UObject * WorldContextObject,
USoundBase * Sound,
float VolumeMultiplier,
float PitchMultiplier,
float StartTime,
USoundConcurrency * ConcurrencySettings,
bool bPersistAcrossLevelTransition,
bool bAutoDestroy
)