UAudioComponent::OnRegister
#include "Components/AudioComponent.h"
Access: public
Specifiers: virtualoverride
Description
Called when the component is registered with its owning world, after which it performs audio-specific setup such as deferring auto-attachment and updating the editor sprite texture.
Caveats & Gotchas
- • This is an engine-internal ActorComponent lifecycle hook, not something you call directly — override it only when extending UAudioComponent itself, and always call Super::OnRegister() first.
- • If bAutoManageAttachment is true and AutoAttachParent is null at this point, the component defers attachment until Activate() runs rather than attaching immediately.
Signature
virtual void OnRegister() override Return Type
void Example
Override pattern for a derived audio component C++
void UMyAudioComponent::OnRegister()
{
Super::OnRegister();
// Additional registration-time setup
} See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?