UAudioComponent::Deactivate
#include "Components/AudioComponent.h"
Access: public
Specifiers: virtualoverride
Description
Deactivates the component, which for UAudioComponent stops the currently playing sound if one is active.
Caveats & Gotchas
- • This stops playback as a side effect of the generic ActorComponent deactivation path — prefer calling Stop() directly in gameplay code when you only want to stop the sound, since Deactivate() also flips bIsActive and can trigger other component-level cleanup.
- • If bAutoManageAttachment is enabled, deactivation is one of the paths that can trigger detachment from AutoAttachParent, restoring the saved relative transform.
Signature
virtual void Deactivate() override Return Type
void Example
Deactivate a component to stop and reset it C++
AudioComponent->Deactivate(); See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?