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 and Actions:

  1. On the Content Browser, click the green Add New button and select Blueprint Class.
  2. On the next screen, choose Actor as the parent class.
  3. Rename the Blueprint created to RotatingChair.
  4. Double-click this Blueprint to open the Blueprint Editor.
  5. On the Components panel, click the green Add Component button and select Static Mesh, as shown in the following screenshot. This Static Mesh will visually represent this Blueprint:

  1. On the Details panel, there is a property named Static Mesh, which has a drop-down input. Click on the dropdown and select a Static Mesh named SM_Chair. This is a Static Mesh that is part of the starter content. The following screenshot shows the selected SM_Chair:

  1. Let's add another Component. Click the green Add Component button and type rotating movement in the Search box.
  2. Click on the Rotating Movement Component to add it. By default, this Component will rotate the Blueprint around the axis, so we don't need to change its properties.
  3. Click the Compile button and save the Blueprint.
  4. On the Level Editor, drag the RotatingChair Blueprint from the Content Browser and drop it somewhere in the Level.
  5. Press the Play button of the Level Editor to see the rotating chair.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset