Introduction Components are a core part of any Component Based Development, they are Objects which define modular reusable behavior. In Unreal Engine 4 Actors are composed of components, every Acto...

Updated about 4 years ago Edit Page Revisions


Components are a core part of any Component Based Development, they are Objects which define modular reusable behavior. In Unreal Engine 4 Actors are composed of components, every Actor has a base Scene Component which is referred to as the Root Component of that Actor and provides its world transform.

Component Types

Actor Component

  • UActorComponent is the base type for any Component which will extend behaviors of an Actor, including Scene Components.

Scene Component

  • USceneComponent has a transform allowing it to be physically present in the game world at a certain location. This also means that all components allowing attachment are either of USceneComponent type or inherit from it.

Primitive Components

  • These types of Components are subclasses of Scene Component and add some form of physical representation in the game world. Examples include UStaticMeshComponent, USkeletalMeshComponent, and UTextRenderComponent.

Physics Components

  • For more information on Physics Components, including Collision Components please see Physics. Examples include UCapsuleComponent.

Visualization Components

  • These types of Components are only visible in Editor Builds, they are not relevant for gameplay purposes.

Creating Components

We assume you are familiar with Creating Classes.


class AYourActor : public AActor

    UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Camera, meta = (AllowPrivateAccess = "true"))
    class USpringArmComponent* CameraBoom;

We assume you are familiar with Creating Blueprints deriving from Actor.

Default Components

YourActor.cpp in the constructor of your Class.

    CameraBoom = CreateDefaultSubobject(TEXT("CameraBoom"));





Very similar to creating any other UObject at runtime except you have to make sure your Component is Registered.

    auto *InstanceMesh = NewObject (Master);
    InstanceMesh->CreationMethod = EComponentCreationMethod::Instance;
    InstanceMesh->AddInstance(FTransform(Rotation, Location, FVector(1.0f, 1.0f, 1.0f)));

On your graph if you Right Click and bring up the Blueprint Context Menu you type add and you will see a list of components in the menu to select from.



You can also do this from Blueprints Construction Script


You may want a Component which is only used in the Editor, this also gives you the ability to have an editor tickable component if you require it to update.

New Components Types


UCLASS(HideCategories = ("Rendering", "Input", "HLOD", "Sockets", "Collision"), meta = (BlueprintSpawnableComponent))
class UYourComponent : public UActorComponent

In the Content Browser press the big green Add New button or Right Click in the empty space on the tab. You will see a list of Objects you can create, go down to the Blueprint Category and select Blueprint Class.

You will see a floating window asking you to pick your Blueprints Parent Class (more info here), you can select either Actor or Scene Component from the quick button list or expand the search box and find Actor Component using the arrow to drop that down. Now you have a list of every Component available to you, it includes those found in Plugins.

Attaching Components

How to attach components, link to attaching actors

Detaching Components

Replicating Components

Editor Tick Components

== Further Reading ==


Programming Guide to Components

Component Replication

Component Window in Unreal Editor

Blueprint API