Unreal Engine 5 Component Blueprint Nodes in C++
Components are the building blocks of every Actor in Unreal Engine 5, and most Blueprint component nodes map directly to functions on USceneComponent, UMeshComponent, or USkeletalMeshComponent. This category covers the C++ equivalents for the nodes you reach for most: creating and attaching components, moving them with relative and world transforms, toggling visibility, swapping materials, and reading a component's world location.
Each page shows the exact .h and .cpp code, including the right macros (UPROPERTY, CreateDefaultSubobject) and helper structs (FAttachmentTransformRules, FQuat) so you can move from a Blueprint graph to compilable C++ without guessing the API.
12 nodes in this category.
Play Animation
The Play Animation node maps toUSkeletalMeshComponent::PlayAnimation, which plays a single UAnimationAsset directly on a skeletal mesh component, with a second argument controlling whether it loops.View C++ equivalent →Set Relative Location
The Set Relative Location node maps toUSceneComponent::SetRelativeLocation, which positions a component relative to its parent using an FVector offset.View C++ equivalent →Set World Location
The Set World Location node maps toUSceneComponent::SetWorldLocation, which places a component at an absolute position in the world using an FVector, regardless of its parent.View C++ equivalent →Set Relative Rotation
The Set Relative Rotation node maps toUSceneComponent::SetRelativeRotation, rotating a component relative to its parent. In C++ you convert your FRotator with FQuat::MakeFromRotator to use the quaternion overload.View C++ equivalent →Set World Rotation
The Set World Rotation node maps toUSceneComponent::SetWorldRotation, which orients a component in absolute world space. Convert your FRotator with FQuat::MakeFromRotator for the quaternion overload.View C++ equivalent →Create Component (constructor)
Creating a component in Blueprint's Components panel maps toCreateDefaultSubobject<T>() in the Actor constructor, the only place default subobjects can be created in C++.View C++ equivalent →Add Component (at runtime)
Adding a component dynamically maps toNewObject<T>(), followed by RegisterComponent() and AttachToComponent(). This is the runtime counterpart to creating components in the constructor.View C++ equivalent →Attach To Component
The Attach To Component node maps toUSceneComponent::AttachToComponent, which parents one component to another using an FAttachmentTransformRules and an optional socket name.View C++ equivalent →Get Component By Class
The Get Component By Class node maps to the templatedAActor::FindComponentByClass<T>(), which returns the first component of the requested type on an Actor, or nullptr if none exists.View C++ equivalent →Set Visibility
The Set Visibility node maps toUSceneComponent::SetVisibility, which shows or hides a component and, with the second argument, can propagate that change to its child components.View C++ equivalent →Set Material
The Set Material node maps toUMeshComponent::SetMaterial, which assigns a material to a specific element index (material slot) on a mesh component.View C++ equivalent →Get World Location (Component)
The Get World Location node for a component maps toUSceneComponent::GetComponentLocation, which returns the component's current position in world space as an FVector.View C++ equivalent →