AActor::BlueprintCreatedComponents
#include "GameFramework/Actor.h"
Access: public
Specifiers: UPROPERTYTextExportTransientNonTransactional
Description
Stores the actor components that were created by Blueprint construction scripts and serialised on a per-instance basis. This array is what distinguishes Blueprint-added components from natively-constructed ones.
Caveats & Gotchas
- • Do not iterate this array in C++ to find components — use GetComponents() instead. BlueprintCreatedComponents is an internal serialization array; its contents can include destroyed or pending-kill components in certain editor undo states.
- • The TextExportTransient specifier means this array is not exported in text-format copy/paste operations. Blueprint components that belong to an actor are thus not duplicated through text copy — they are rebuilt by re-running the construction script.
- • In editor CDOs, this array is empty. Blueprint components only appear here on spawned actor instances after the construction script runs, which is why GetActorClassDefaultComponents exists as a workaround.
Signature
UPROPERTY(TextExportTransient, NonTransactional)
TArray<TObjectPtr<UActorComponent>> BlueprintCreatedComponents Example
Correct way to enumerate all components (not by reading this array directly) C++
// Prefer GetComponents() — it merges natively-constructed and Blueprint-created components
TInlineComponentArray<UActorComponent*> AllComps(this);
for (UActorComponent* Comp : AllComps)
{
// Process Comp
} Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?