From the course: Unreal Engine Blueprint Interaction for ArchViz Projects

Assembling the Blueprint Actor - Unreal Engine Tutorial

From the course: Unreal Engine Blueprint Interaction for ArchViz Projects

Start my 1-month free trial

Assembling the Blueprint Actor

- [Instructor] In this particular video, we want to set up our first Active Blueprint. Which in our case is a screen we can interact with. We do have some specific goals for this blueprint in that we first of all want to be able to click on or interact with the screen. And that we will also want to eventually have a highlight material applied to it, that clues as to the fact that we can in fact do that. Going further though, we also want that interaction to play a pre-rendered MP4 video file along with audio. Quite a lot to pack into a single blueprint, but some good stuff to learn. And so, coming to the content browser, inside the O2 interaction folder, let's right click to create a new blueprint actor. And then call it BP_Screen. Once done we can double click to enter the blueprint and then also make sure that we are inside the view port tab We now want to adjust the size of our UI, so that we can see the content browser. As this will make getting a reference to our Static Mesh Asset a little easier. Inside the content browser then we want to navigate to the Office Assets folder. And then in the search field type SM_. What we can do now is click and drag on the monitor screen, so as to place it at 000 in our view port. Which we may need to use the numerical fields in order to do And if we then look inside the content tab, we can see that it has indeed been added to our actor blueprint. And we can then make the UI of our actor full screen, either by ducking it as a tab or by clicking the maximize window button. And then come to the add components button and add a box collision component to the actor. Now do feel free to search for it in the list rather than scroll through all of the options that are available if you would prefer. Now this box collision component is super important as it's going to aid in our interaction with our actor. So once added, we can use the move and scale tools just to make sure that it surrounds our monitor. After which, so as to help make it nice and easy for our user to interact with the actor, we will, with the collision box selected, come to the details tab and make sure the collision preset dropdown is set to block all dynamic. And we're doing this because later on, when we set up the blueprint code, it will block our line trace and return a hit value that we can make use of. We are also, while we are here, going to call the box collision, Int_door_collision. Now this will be my naming convention for collision boxes throughout this course, as it will really help me later on, if they all follow the same naming convention pattern. But more on that later. We will then add a media sound component to the asset making sure that it is set at around about the center of the screen if it isn't already. As this will play the audio for our screen a little later on it is an essential piece of the puzzle. Now we will have to come back here to finish this setup a little later on, but for now we can call this screen_sound as this again means that, well we can be confident that we have a means of accessing the audio that we need. Now, it would probably be good to note here that having a separate sound file that we could use would give us more flexibility and believability than having the audio and video in a single file as we do. But, in order to keep things as simple as possible, given that this may well be the first time that you have access to video and audio in a blueprint, we will simply use the audio that comes from the MP4 video file. And now that we have our blueprint actor foundations set up and ready to go, we can save it and close the dialogue. Now as a quick tip regarding asset placement so that we don't have to go through our level and delete every monitor and then replace them all on the desks, let's come to the world out-liner, click on the first instance of the sm_office, all in one object, and then mouse holding down the shift key go ahead and select the last version of this asset in the list. Now, here's where the little trick comes in because inside the content browser, let's make sure that we have our new blueprint monitor selected. And then in the 3D view port, right click on one of the current monitors. From the list that appears, what we can do now is tell them to replace this actor with our new blueprint version. Which as you can see, is a very handy way of replacing already laid out static mesh actors in the project. This can really save lots of time on big projects where you realize that an actor that has been duplicated over and over again now actually needs swapping out. And with that, we're done for now. Laying a good foundation is of course really important as it gets our brains to focus early on in the process on our projects' needs. We now have our actor, but really no way to test if the blueprint is working as we have not set up the click interaction logic. So even though there are other areas of this blueprint that we will certainly need to finish off, for now, we can be happy that the core aspects of what we need are set up and ready to go. This lets us move on next to setting up a way in which we can properly test our screen blueprint, once it is built.

Contents