UGameplayStatics::PopSoundMixModifier
#include "Kismet/GameplayStatics.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintCallable
Description
Decrements the active count of a Sound Mix Modifier and deactivates it when the count reaches zero. Pair this with every call to PushSoundMixModifier to avoid orphaned mixes.
Caveats & Gotchas
- • Popping a mix that was never pushed is a no-op and logs a warning in debug builds; it does not crash, but indicates a logic error.
- • The fade-out time used when deactivating is defined on the Sound Mix asset itself, not passed here — configure it in the asset's properties.
Signature
static ENGINE_API void PopSoundMixModifier(const UObject* WorldContextObject, class USoundMix* InSoundMixModifier); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| WorldContextObject | const UObject* | Object used to resolve the current world. | — |
| InSoundMixModifier | class USoundMix* | The Sound Mix asset to deactivate. | — |
Return Type
void Example
Deactivate underwater mix on surface C++
// When the player surfaces, remove the underwater mix activated on submersion.
UGameplayStatics::PopSoundMixModifier(this, UnderwaterMix); Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?