UAudioComponent::OnAudioPlaybackPercent
#include "Components/AudioComponent.h"
Access: public
Specifiers: UPROPERTYBlueprintAssignable
Description
Broadcasts periodically while the sound plays, reporting the percentage of playback completed based on samples played versus total samples, adjusted for pitch.
Caveats & Gotchas
- • Not implemented on all platforms — the engine's own source comment notes this explicitly, so don't rely on it firing consistently everywhere without testing on your target platforms.
- • Reports per-SoundWave, not per-component — if the component's sound is a Sound Cue mixing multiple waves, expect one callback per contributing wave rather than a single aggregate percentage.
Signature
FOnAudioPlaybackPercent OnAudioPlaybackPercent Example
Drive a lip-sync curve from playback percent C++
AudioComp->OnAudioPlaybackPercentNative.AddLambda([](const UAudioComponent* Comp, const USoundWave* Wave, const float Percent)
{
UE_LOG(LogTemp, Log, TEXT("Playback: %.1f%%"), Percent * 100.f);
}); Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?