Adding Components to a Blueprint
Now, let's create our first Blueprint. It will be a very simple Blueprint that will only contain Components. For now, we will not use Events or Actions:
- Click the Content Drawer button to open the Content Browser, then click the Add button and select Blueprint Class.
- On the next screen, choose Actor as the parent class.
- Rename the Blueprint we just created to
BP_RotatingChair
. Blueprints cannot have spaces in their name and there is a convention of starting Blueprint names withBP_
. - Double-click this Blueprint to open the Blueprint Editor.
- On the Components panel, click the Add button and select Static Mesh, as shown in the following screenshot. This Static Mesh will visually represent this Blueprint.
- On the Details panel, there is a property named Static Mesh, which has a drop-down input. Click on the dropdown and select the Static Mesh property named SM_Chair. This Static Mesh is part of the starter content. The following screenshot shows the selected SM_Chair:
- Let's add another Component. Click the Add button of the Components panel and type
rotating movement
in the Search box. - Click on the Rotating Movement Component to add it. By default, this Component will rotate the Blueprint around the z axis, so we don't need to change its properties.
- Click the Compile button and save the Blueprint.
- On the Level Editor, drag the BP_RotatingChair Blueprint from the Content Browser and drop it somewhere in the Level.
- Press the Play button of the Level Editor to see the rotating chair. You can use the WASD keys to move the character and the mouse to rotate the camera. You can exit the Level being played by pressing the Esc key. The next screenshot shows the example in execution: