RealDocs

AActor::FinishAddComponent

function Engine Blueprint Since 4.0
#include "GameFramework/Actor.h"
Access: public Specifiers: UFUNCTIONBlueprintCallable

Description

Completes the registration of a component that was created with bDeferredFinish=true. Called by Blueprint after expose-on-spawn properties have been set on the component.

Caveats & Gotchas

  • Do not call this on a component that was already fully registered (bDeferredFinish=false in AddComponent). Calling it twice will attempt to re-register and may cause asset/render state corruption.
  • The component is not usable (no physics, no render state, no ticking) until FinishAddComponent completes. Accessing component functionality between AddComponent and FinishAddComponent in the deferred path is undefined behavior.

Signature

ENGINE_API void FinishAddComponent(UActorComponent* Component, bool bManualAttachment, const FTransform& RelativeTransform)

Parameters

Name Type Description Default
Component UActorComponent* The component returned from AddComponent/AddComponentByClass to finish registering.
bManualAttachment bool Whether the caller will handle attachment manually.
RelativeTransform const FTransform& Relative transform to apply during auto-attachment.

Return Type

void

Example

Deferred component creation in Blueprint (conceptual) C++
// This pattern is used internally by Blueprint 'Add Component' nodes
// when Expose on Spawn variables are present:
UActorComponent* Comp = AddComponent(TemplateName, false, RelTransform, Context, /*bDeferredFinish=*/true);
// ... set expose-on-spawn properties on Comp here ...
FinishAddComponent(Comp, false, RelTransform);

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.