{ }Blueprint → C++

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 to USkeletalMeshComponent::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 to USceneComponent::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 to USceneComponent::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 to USceneComponent::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 to USceneComponent::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 to CreateDefaultSubobject<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 to NewObject<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 to USceneComponent::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 templated AActor::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 to USceneComponent::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 to UMeshComponent::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 to USceneComponent::GetComponentLocation, which returns the component's current position in world space as an FVector.View C++ equivalent →