RealDocs

UAudioComponent::GetLastPlayOrder

function Engine Since 5.0
#include "Components/AudioComponent.h"
Access: public Specifiers: inline

Description

Returns a monotonically increasing counter recorded the last time this component started playing a sound, used internally to order concurrent sound instances.

Caveats & Gotchas

  • This is bookkeeping for the concurrency/prioritization system, not a timestamp — it has no meaning outside comparing relative play order between components.
  • The value is only updated on Play(); it does not change while a sound is paused, fading, or stopped.

Signature

uint32 GetLastPlayOrder() const { return LastSoundPlayOrder; }

Return Type

uint32

Example

Compare play order between two components C++
if (ComponentA->GetLastPlayOrder() < ComponentB->GetLastPlayOrder())
{
    // ComponentA started playing first
}

Version History

Introduced in: 5.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.