Language:
Page Info
Skill Level:
Engine Version:

3 - TV Blueprint Setup - Components

Choose your OS:

In previous steps, we set up our media content and created a Material that will be used to play our video. In the next few steps, we will use Blueprints Visual Scripting (Unreal Engine's visual node-based scripting system) to create an interactable TV Blueprint that will enable players to walk up to and turn on/off our specified video content. In this step, we add the Components that will make up our interactable TV.

Steps

  1. Inside the Content Browser, create a folder called Blueprints. Navigate to that folder and right-click to create a new Blueprint Class.

    Blueprint_01.png

  2. In the Pick Parent Class window, select Actor, then name the Blueprint TV_Blueprint.

    Blueprint_02.png

    Picking a Parent Class is a way to inherit properties or functionality from an existing class (we just want a generic Actor that can be spawned or placed in the world).

  3. Open the TV_Blueprint. In the upper-left, click the +Add Component button and search for and add a Static Mesh.

    Blueprint_03.png

    Components are a special type of Object designed to be used as sub-objects within Actors. In this case, we need a Static Mesh to represent our TV, a Box Collision volume to tell us when the player is in range to turn on/off the TV, and a Media Sound Component to play the audio associated with our Media Player.

  4. For the Static Mesh, name it TV_Mesh. In the Details panel, set the Static Mesh field to SM_TV.

    Blueprint_04.png

  5. Click the +Add Component button and add a Box Collision Component. Resize it in the viewport as desired in front of the TV.

    Blueprint_05.png

    You can use the Transform Tools and widget in the viewport to Translate (W-key), Rotate (E-key) or Scale (R-key) the box.

  6. Click the +Add Component button and add a Media Sound Component.

    Blueprint_06.png

    The Media Sound Component is needed to play audio associated with a video file.

  7. In the Details panel for the Media Sound Component, set the Media Player field to MediaPlayer_01.

    Blueprint_07.png

    Now when we open the Media Player, this Media Sound Component will also open and begin playing the audio associated with the video playing.

End Result

With each of the Components for our TV Blueprint set up, in the next step, we will define some of the options that we want to be customizable within our TV Blueprint. This will enable us to define in the Editor what Media Texture and Media Sound are associated with a TV in the Level and change them on a per-instance basis (enabling us to have the same TV Blueprint, playing different content on each).