With the new 4.7 update of Unreal Engine you can now create your own component types for your Blueprints and Actors. They are like small snippets of modular code that can be added to any actor in your level.
For example, we could create a “Spinner” component which would make every actor that uses it to spin around.
There are several tutorials about this concept on the Unreal Engine YouTube channel, but all of them approach it with Blueprints. And while Blueprints are really useful, it is also important to know how to create these components with C++. In this tutorial you will learn to create a simple component in C++ from scratch.
Link to the tutorial: