Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/AActor
Description
Attaches the RootComponent of this Actor to the supplied component, optionally at a named socket. It is not valid to call this on components that are not Registered.
| Name | AttachToComponent |
| Type | function |
| Header File | /Engine/Source/Runtime/Engine/Classes/GameFramework/Actor.h |
| Include Path | #include "GameFramework/Actor.h" |
| Source | /Engine/Source/Runtime/Engine/Private/Actor.cpp |
bool AttachToComponent
(
USceneComponent * Parent,
const FAttachmentTransformRules & AttachmentRules,
FName SocketName
)
Whether the attachment was successful or not
Parameters
| Name | Remarks |
|---|---|
| Parent | Parent to attach to. |
| AttachmentRules | How to handle transforms and welding when attaching. |
| SocketName | Optional socket to attach to on the parent. |