UAudioComponent::SetPaused
#include "Components/AudioComponent.h"
Access: public
Specifiers: UFUNCTIONBlueprintCallable
Description
Pauses or resumes the sound currently playing on this component without stopping and restarting it.
Caveats & Gotchas
- • Pausing doesn't stop the component from ticking or re-checking occlusion — a paused-but-not-stopped component still carries some overhead compared to one that's been Stop()'d.
- • Calling SetPaused(true) on a component with no active sound is harmless but has no observable effect since there's nothing to pause.
Signature
void SetPaused(bool bPause) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| bPause | bool | True to pause the sound, false to resume it. | — |
Return Type
void Example
Pause ambience during a cutscene C++
AmbienceComp->SetPaused(true);
// ... cutscene plays ...
AmbienceComp->SetPaused(false); Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?