Components

A compendium of the different types of Components designed to be used as sub-objects within an Actor.

Choose your operating system:

Windows

macOS

Linux

A Component is a piece of functionality that can be added to an Actor.

When you add a Component to an Actor, the Actor can use the functionality that the Component provides. For example:

  • A Spot Light Component will make your Actor emit light like a spot light.

  • A Rotating Movement Component will make your Actor spin around.

  • An Audio Component will give your Actor the ability to play sounds.

Components must be attached to an Actor and can't exist by themselves.

When adding Components to an Actor, you are putting together the bits and pieces that will make up that Actor as a whole who will be placed in your level(s). For example, the wheels on a car, the steering wheel, the body of the car, the lights etc. would all be considered as Components while the car itself is the Actor.

Once you have added the Components that define your Actor, it is important to note that you can place the Actor in your level even without providing any Blueprint script (or C++ Code) as to how the car should function (as in the real world, a car can exist as an object without a driver providing the instructions to tell the car what to do). Since the "gas pedal" would be a Component, through script or code you would indicate that the gas pedal has been pressed and in turn provide the logic for the car to speed up. Each Component could then be accessed in this manner (turning on the lights, honking the horn, turning up the radio, steering, etc.)

Component Instancing

Contrary to the default behavior of sub-objects in general, Components created as sub-objects within an Actor are instanced, meaning each Actor instance of a particular class gets its own unique instances of the Components. A simple way to visualize this is to imagine the vehicle described above. A Car class might use Components to represent the wheels of the car. Four Wheel Components would be created as sub-objects in the default properties of the class and assigned to a "Wheels" array. When a new Car instance is created, new instances of the Wheel Components are created specifically for that particular Car. If this were not the case, when one Car in the world moved, the wheels of all Cars would turn; which is clearly not the desired behavior. Instancing of Components by default simplifies the process of quickly adding unique sub-objects to Actors.

Without Component instancing, all Component variables would need to be declared using the Instanced property specifier .

Component Types

There are several different types of Components that can be added to an Actor, refer to the links below for more information:

You can also refer to the Component Visualizers section of the Unreal Engine API Reference for additional Components.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss