UAudioComponent::GetPlayState
#include "Components/AudioComponent.h"
Access: public
Specifiers: constUFUNCTIONBlueprintCallable
Description
Returns the detailed play state of the audio component: Playing, Stopped, Paused, FadingIn, or FadingOut.
Caveats & Gotchas
- • Unlike IsPlaying(), which collapses fading and paused states into 'true', GetPlayState() lets you distinguish those states explicitly — useful for UI that shows fade progress.
- • FadingIn and FadingOut are only reported while an AdjustVolume() or FadeIn/FadeOut fade is actively interpolating; once complete the state settles to Playing or Stopped.
- • Does not reflect virtualization — a virtualized sound still reports Playing.
Signature
EAudioComponentPlayState GetPlayState() const Return Type
EAudioComponentPlayState Example
React to fade states C++
switch (AudioComponent->GetPlayState())
{
case EAudioComponentPlayState::FadingOut:
UpdateFadeOutUI();
break;
case EAudioComponentPlayState::Stopped:
OnAudioFinished();
break;
default:
break;
} Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?