4 - TV Blueprint Setup - Construction Script

In this step, we use the Construction Script to set up some parameters that we can change for the TV Blueprint within the editor.


Marked as Docs as the page has been combined into one page.

With the Components of our TV Blueprint defined, we'll set up the Construction Script so that we can change the content on our TVs when we place them in our level.


  1. Inside the TV_Blueprint, click on the Construction Script tab below the Main Toolbar.


  2. Right-click in the graph and add a Create Dynamic Material Instance node. Set the Parent to M_TV_Inst and connect as shown.


    To change the Media Texture within the Material applied to our TV, we first need to create a Dynamic Material Instance based on that Material and assign it to our TV.

  3. On the Return Value of the Create Dynamic Material Instance node, right-click and select Promote to Variable and call it TV_MID.


    This will store a reference to the Dynamic Material we created, which we can use later in our setup.

  4. In the Components window, select the TV_Mesh, then, in the graph, right-click and choose Set Material (TV_Mesh).


    This will add a reference to the TV and a Set Material node, which we can then assign our Dynamic Material to.

  5. From the My Blueprint panel, drag the TV_MID variable onto the Material pin of the Set Material node and connect as shown.


  6. Drag off the TV_MID node and use a Set Texture Parameter Value node. Connect as shown.


  7. Set the Parameter Name to TV_Texture, then right-click on Value. Select Promote to Variable and call it Texture for TV.


    This will enable us to define what Media Texture we want to sample on a per-TV basis, as it is now a variable.

  8. From the Components window, drag the Media Sound asset into the graph, then drag off it and use Set Media Player.


  9. Right-click on the Media Player pin and select Promote to Variable. Call the new variable Media Player for Sound and connect as shown.


    Similar to the way we set up our texture, this will enable us to define what Media Player to associate the Media Sound with on a per-TV basis.

    Your full graph should look like the following.:

    Click for full view.

  10. In the My Blueprint panel, select the TextureForTV variable, then set as Instance Editable and assign the MediaPlayer_01_Video Media Texture.


    Here, we are defining the Default Value to use for our Texture and enabling Instance Editable gives us a way to change this value for each instance of this Blueprint.

    In order to set the Media Texture Default Value, you may need to click the Compile button from the Main Toolbar.

  11. In the My Blueprint panel, select the MediaPlayerForSound variable, then set as Instance Editable and assign the MediaPlayer_01 Media Player.


    Similar to the previous step, we are assigning the Default Value and providing a way for us to change this value on a per-instance basis.

    In order to set the Media Player Default Value, you may need to click the Compile button from the Main Toolbar.

End Result

Our TV Blueprint is now set up in a way that enables us to define what Media Sound, Media Texture, and in the next step, Media Player Assets we want to associate with which TVs we place in our level. By creating variables for those Assets and making them Instance Editable, this gives us the flexibility to change the content on any TV we place, but reuse the functionality that enables the player to turn the TV on or off.

Select Skin

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback