Unreal Engine 5 Blueprints | Amer Sawalha | Skillshare
Search

Playback Speed


1.0x


  • 0.5x
  • 0.75x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 1.75x
  • 2x

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Lessons in This Class

    • 1.

      Unreal engine 5 blueprint minicourse

      1:52

    • 2.

      Chapter Intro

      2:57

    • 3.

      What is Blueprints

      10:14

    • 4.

      First Person Character

      11:57

    • 5.

      Environment Sound

      14:03

    • 6.

      Simple Door

      16:52

    • 7.

      Sliding Door With Curtains Animation

      30:30

    • 8.

      Menu Creation Front End

      34:37

    • 9.

      Multiple Saves And Level Optimization

      6:43

    • 10.

      Menu Creation Back End

      9:38

    • 11.

      Menu Animation

      30:34

    • 12.

      Material Changer

      17:02

    • 13.

      Lights And Music Onoff

      14:08

    • 14.

      Tv And Media

      10:57

    • 15.

      Water Animation

      7:02

    • 16.

      Object Changer

      7:41

    • 17.

      104 Packiging

      28:19

  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.

47

Students

--

Project

About This Class

Unreal Engine 5 (Blueprints) for beginners and architects
Chapter 19 out of 23 from Unreal Engine 5 for beginners and Archviz full course

About

When we are talking about physical products, usually it's difficult to change our minds, especially after purchasing them, but through digital products, we can provide different options digitally, which eventually saves us a lot of time and money.

In this course, you will learn about blueprints and their different concepts, types, and compatibilities in the simplest way possible. You will also learn how to create many basic and advanced interactions in your scene, where you will be able to achieve professional and realistic results; send them to the client, where they can review their dream project in a real-time EXE product, and they can have options for a customized experience, changing whatever they are not sure about.

In this class, you will learn the following:

  1. Collision 
  2. Chapter intro
  3. Whats blueprints
  4. First Person character
  5. Environment and sound
  6. Simple doors 
  7. Sliding doors with curtain animation
  8. Menu creation front-end
  9. Multiple saves and optimization
  10. Menu creation back-end
  11. Menu animation
  12. Material changer
  13. Lights and music on/off
  14. TV and media 
  15. Water animation
  16. Object changer
  17. Packaging

At the end of this course:

This blueprint course is a 7-year combined experience in Archviz blueprints, where after this course you will know what you need, where to look, debug your project, and make sure everything is in place, Looking forward to seeing you in this course and many ahead!

How to follow along?
This course is a resource you can always go back to, follow along in 2 different ways, first is that the student downloads the class files and applies blueprints to similar static meshes to learn how to apply functional blueprints. Another approach is that the student applies these functional blueprints on the student's Unreal project directly.

Meet Your Teacher

Teacher Profile Image

Amer Sawalha

Immersive Design, VR/AR, Unreal Trainer

Teacher

Hello,
I'm Amer, I'm a senior architect with 8 years of experience in architecture and immersive design technology. I'm an unreal engine trainer for 6 years, I've trained over 2000 students and 10 international companies to become very confident and competitive Unreal and 3D's Max users, and I will be uploading some CGI technical courses that will help you become better at visualizing your ideas.

See full profile

Level: Beginner

Class Ratings

Expectations Met?
    Exceeded!
  • 0%
  • Yes
  • 0%
  • Somewhat
  • 0%
  • Not really
  • 0%

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

Take classes on the go with the Skillshare app. Stream or download to watch on the plane, the subway, or wherever you learn best.

Transcripts

1. Unreal engine 5 blueprint minicourse: Welcome everyone to the Unreal E ngine five Mini course for Blueprints, where creativity knows no bounds. Throughout this transformative journey, you will master the fundamental concepts of blueprints, empowering you to craft fully customized interactive experiences with unreal visual scripting language, from enhancing client communication to saving valuable time and resources. This course is your gateway to game development Excellence. Get ready to dive into a bunch of cool stuff. We're going to start off by explaining blueprints, going from types, interface, common nodes to fully functional code. Then we will tackle mastering collisions, what they are, why they're important, and how to use them effectively. We'll learn how to customize our first person character to make our game worlds feel even more immersive. We'll explore how to use sound to really draw players into our game environment, and we'll get into creating all sorts of cool interactions, like objects that rotate and slide around. We will help you elevate your designs with animated geometry caches. Plus, we will cover things like craft, sleek, in game menus, and functional widgets. Connect the back end with fines using vertile nodes. We'll even dive into some material logic so you can make your game look exactly how you wanted to. We'll learn how to eliminate our world with dynamic lighting effects and switches, enrich our experience with interactive media, including TV controls. We will also explore lymbic files for captivating water animations. Last but not least, we will provide clients with customizable static meshes. And finally, we will be able to package and deliver our dream project with confidence. This and many things you will learn in one of the best courses in the world. So if you're ready for an awesome learning experience, come join us at TitmVz Academy. Strap in tight because we're about to embark an exciting journey together. 2. Chapter Intro: Hello, everyone. Welcome to a new lecture, and a new chapter, guys. In this chapter, guys, we will talk about blueprints. One of the most wonderful topics in unreal Engine five and Unreal Engine four and unreal engine in general. It is the main topic that makes unreal engine better than any modeling or rendering software according to rendering and interactivity. So what we will learn in this chapter many things, guys. One of it is when we walk in the scene, we press tab, we get menu. Let's do F 11. So the menu is to size. We will learn how to put sounds. We will learn when we come next to a door, how the door opens and the curtain starts moving. We will learn how to do animated Widgit. So we can change the floor, for example, with different colors, we can change the sofa. What the materials that are on top of it. If there is music, I can turn it off. If there is light, I can turn them on or turn them off. This is because of the nanite visualization guys. We will talk about it later on. We will control many areas. We will be able to change the table that is there. We will be able to change the cabins, anything that we want. We can change or interact with the water. We already did this, but we will learn how to add it to a widget blueprint and be able to press and interact with it. Same thing to the lights on the table. We can change the table to any model we want here. We can learn how to open doors. Coming here, let the door open. We will start the animation. Here, this door also can open. So we will open doors, close doors, see how we do menu. In the meta hall, for example, we will have the door open. Then we will learn in the meta hall how to interact with, for example, the ceiling that I've got, the color of it or the texture of it. I can interact with the walls that are here, for example, I can make them like the main house, or make them white, I can play a video. For example, I can turn off the video. I can cycle through models and change them and see which models I want to do. There are a lot of interactivityes, guys that we're going to talk to I Blueprint Chapter, it's a big chapter, and it will enable us to take an idea on the interactivity in AndreL engine and how to understand the Blueprint chapter. 3. What is Blueprints: Hello, everyone. Welcome to a new lecture. In this lecture, guys, we will talk about what is blueprints. And it's going to be mainly a theoretical lecture, but we will take it in general to understand what is blueprints, and that's like an introductory to blueprints. So guys, if we open Google and we do from here google.com, and we say C plus plus language. We get images. And these images is basically represents a language of programming that comes in like sentences, and this basically happens in unreal engine. So basically, this is the primary language that unreal engine relies on. But unreal engine developed a technology that is based on nodes, and these nodes they called blueprints, and it makes the designers and beginners life much easier, because as simple as our major is not programming, and we don't know how to program. But now we will enter the topic with from an angle that is a bit easier. Okay, guys, so blueprints, Blueprints is, as we said, We said it's programming language. So if I say blueprints here, for example, unreal, and I'll open another Google, so I can differentiate what's the difference. There you go, guys. We get lines of codes that are presented in just one node, and this basically does a certain functionality. So Andre engine has shortcuted all of this in one direction. So basically, I am just a person who is connecting nodes together based on a logic that we will understand together hopefully. And we'll be able to work with it. So blueprints can be cut into two different levels. So level blueprint and class blueprint. So level blueprint, I open level blueprint from here, and here is some of the interactivity we've done so far and, you know, functionalities. Level blueprint is responsible on the main thing of our level. It's like the main boss, right? And there is subsidiaries like it's like a parent, and there is children from it or not from it children just from other parents. So level blueprint is the main That's a parent. And under it, there could be class blueprints for sub child, let's say, blueprints. So that's the main actor is the level, and the sub actor is the class blueprint. Does any rely on the other? No, of course not. I can do either or depend on the interactivity that I need to deliver. But what I can do is I can do a class blueprint and take a certain node from it and read it in the level blueprint from a different order than the class blueprint. Just for us to understand the basic fundamentals of it. We've got level and we've got class. Before that, we've done load level instance for our landscape to load. And we've got the open source for the MediTV for it to work properly. So now I will delete the open level compile, and save. So basically, this is the viewport of the blueprints generally. This is the event graph, and here I want to close a pi pin, or I will keep it just in case we need anything further down the way. So we find from here, guys, we can add things from here. Here are the details of any node that I select or any object that I want to or I wish to control furthermore or any variable. Right click from anywhere I can call any node that I want from here. The word of blueprint guys, it's logic. So it's a couple of codes that are connected to each other. And these are code elements, and each color you know, represents a certain thing. So, for example, red represents event, something that is about to happen. For example, blue is functionality. So event begin play is basically is considered the main actor on when I start the game, what happens? Then load level is functionality. Open source is another functionality. So and the media TV is a variable. So we start kind of starting to know what each color represents. So this is the level blueprint, and we will come and talk about it and we'll come to the class blueprint. So we'll do right click from here, we'll do folder and we'll call it Blueprints. I want to call it Blueprints. Double click inside of it. I'll do right click from here, Blueprint class. And from here, I'm going to get the Blueprint class, and they've got different options for us to pick from. So there are other classes as well we can look for. So what is common for us is what we'll deal with is the actor. We've got the poem, the character, player controller, game mode based actor component, and scam component. So we've got multiple of ones, and I can dive deeper into it even more and more. If we took actor for now, and we're going to call it just Blueprint. Double click from here. We've got the main blueprint editor guys. So this is the viewport of the Blueprint. Here's where I add static messages and also collision boxes and stuff like that. WASD with right click, I can move Here I've got the Diful scene root, and that's basically the start of the scene. Here, I can add certain components, for example, like the static mesh. I can add a door, a couch, anything that affects on it, cube sphere, anything I want to control, point light, scene, actor, there are a lot of things I can add guys and relate to for all the majors. We will talk about the main blueprints that we will need in this course together. Here I've got some graphs and events that I can call directly into each class blueprint whenever I play it. Where is the event graph? Here is the event graph, and here is some event begin play. Actor begin overlap and event tick. So each second, something happens here. So I've got a clock, for example, and it's sticking every second. So I can do an animation or each second clock moves the 1%, for example. So these are the main events that comes with every class. There are a lot of events. If I do right click from here, I can have a lot of events, as you guys can see. If I go to window from here, I've got the palette, and the palette, I can look for any blueprint or function I need from here, I can look for. So I've got more than one way to call nodes, such as the material editor guys. The logic is kind of very similar. So here I can add stuff here, I've got the details of anything. Here, I've got events, functions, construction script. Construction script is things that happens before the logic happens, guys. So it's pre logic, let's call it, something I program before the blueprint, the main blueprint plays, which is in the event graph, for example. Mainly, we're not going to work with the construction script, we're going to do viewpoint and event graph from the class blueprints and from the level blueprints, we will deal with certain interactivityes. So from here, I've got the main viewpoint, here, I've got the event graph and the main viewport of the model. So I can put a gun here, for example, and I can call it from the event graph and do an interactivity or certain logic. Here, I've got macros and functions are let's say, more functionalities and more different ways of connecting different blueprints. And also I can not just add to the scene, I can connect from two different blueprints from the functions that I've got here. So I can do a function in a certain class blueprint and I can call it in a different class call function, for example. So they all start working together. I've got event dispatchers, also more blueprint options. And I've got variables and the variables we did variables before is basically when I want to call certain objects or certain, float or a certain amount. So variables I can configure based on objects nodes or values, as we said. So that's mainly the kick start of the blueprints and a main explanation of the user interface of the blueprint. So we work step by step, everything is okay. Here, I've got the tool bar and the compile and save. They are very important. So when I work on everything and finish working on it, I need to compile and save so everything works. So for example, event begin play, I want to take a certain note from it. I want to say, for example, print string. And from Print String, I want to say hello, welcome to Unreal Engine five course. Compile, save. And here when I begin, I should drag drop my blueprint into the viewport because if I don't do this, it won't play. And here I see it on the top corner left. Hello. Welcome to Andre Langel five course. So it showed, and it's gone. So I can put this interactivity from here. I can I can do control X from here, compile save, and then I can go to the main level blueprint from here, and I can do Control V from here, and I can plate it from here. You see, we're flexible. We can copy almost everything from anywhere and still get the same results. Hello. Welcome to Andre Engine five course. We still get the same logic. And that's it, guys. This is a kick start for blueprints. I hope you guys benefit from this lecture. See you guys in the coming ones. 4. First Person Character: Hello, everyone. Welcome to a new lecture. In this lecture, we will learn how to configure our first person character, and we will be able to collide the collisions that we have done before, and it will be convenient for us to export as an EXE and the client then walk through his own project. So when I do play, this is what the client gets, W ASD, the client can walk through this. But it's a fly through. It's not a character. The character is not walking on the floor. The character is flying. So this is something important for me to fix, so the client can feel that they are in an immersive experience. How do I fix this? Guys, in the Arcs template, it comes empty with no character blueprints like the first person or the third person. Those are found in the games templates. Should I open a new template and migrate my entire project to it? No, I can add the template features from the content browser from here. From any template I want. Content at feature pack. And from here, I've got first person, third person, top down. Each one has its own character and its own rig and its own parameters, so I will take the first person. Most games are done on first person. Third person is like Fortnight, for example, the camera is behind me and I can see the character when its walk. Here, it's like GTA, one, top down, I can see the player from the top. Also more strategic games. Here's the augmented reality template, the virtual reality, and the vehicle, if I want the vehicle. Of course, if I'm I'm developing with code, I do C plus plus, and here I can add starter content, the one that comes with materials, lights, and effects, and many other cool stuff. We already got it, so we'll take first person for now, add to project. Now we've got the first person template and all the blueprints that comes with it. Where do I find the first person? I find it in the first person, the content browser, arms, weapons, all the things that I need here in the game that I need. Great. Now what I want to do is I want to go to first person blueprints and from blueprints, I can find the first person character, the game mode, the projectile that comes from the gun, the gun itself, and here the weapon component. Different blueprints, as you guys can see. Some of it is class blueprints, such as these, some of it is a blueprints. There are multiple types of blueprints and the game mode, and so on and so forth. Now what I want is the character. I will drag and drop the character into the scene. And I want to rotate it this way. 90 degrees. And I'll do play. Okay, I did play, the character is not playing. Why? Because I did not, you know, configure my level into the correct game mode. I've got different game modes. Okay. Where do I change the game mode from the world settings? If I don't have the world settings, I go from window, and I ask for world settings. Let's see world settings. It added the world settings next to the details. From the game mode, override, I do hear blueprint first person game mode. Now, this package should be configured. Play. The player is falling down. Why? Because it is not colliding with the landscape. So how do we fix this, guys? First thing, first, since we moved the landscape into different levels. So what we will do in the levels, something, so the player can be able to walk. Other than that, I need to do modeling for all of that. I don't get it I don't get it from landscape. I get it as MX. Remember how we did the land from the max. This way, I can put it on another level and be on another level. When it comes to landscape, if I put it on another level, then I should do a couple of things. Otherwise, it's preferable to be in the main level that we've got. In the case that we did, we put the foliage and the trees and the landscape in other levels. So to solve this guys, we can do The ultimate fix for this is that we do right click from here, change streaming method, and we do always load it. This way, and then we save our levels. This way, we can drag drop our player into the scene, and now we can simulate the player to be able to play and walk realistically, and everything is excellent. You see, guys. Now here we did collision space jumps, but as you guys can see, now we're able to walk as normal human scale in the scene that I've got. I can't go inside because I still need to do a couple of edits. But otherwise, it's realistic and it's going great. Here I've got a little bit of struggles when I collide. There are a little bit bigger collisions than it's supposed to be. But everything is realistic and everything is great. I'm able to enter from here. I didn't do collision yet. Here is the area that we got. We are looking as a player. Is this movement realistic? Not that realistic because the capsule of the player is too big, I can't walk through. And also it's too quick. The speed is too quick. So what can we do now? So I'll rotate the capsule now for this. So the capsule is blueprint, as we know, and the camera and the player and the hands and everything. So we'll do double click from here. We've got details and events and all of that pre programmed from unreal. So the hands does not look here, but when I go to reflections, they appear. So I want to do double click from here, and I'll take the hands and delete them. And I'll take the capsule. And I want to minimize the radius to 25, so it is more realistic that I can pass through. And the capsule height, I'll keep it as is. I can increase the height a little bit. Some people likes to make it like 120, for example. I can do this and then raise the camera up. So the camera matches the capsule height. Compile, But in 96, the unreal engine default, I think is okay, we can try. Other than that, I need to go to the mesh from here, and I need to go to the details, sorry, from the character movement, and from the maximum swim speed, not maximum swim speed, I should get maximum run speed, maximum walk speed exactly. Here, I'll do it 150, and here I want to do 150. Compile save. Let's play. Now you guys see that the speed is much slower. And the height is higher. It's slow. I can say that it's slow. But we are able to pass through. So we will edit the speed again. So we'll go to the viewport character movement, and then we'll go to Max Walk Speed 25225 or, 225. Let's see. Play. Now it's better now. Se guys, we can pass through now. In the narrow areas. This is good. Why? Because we have minimized the capsule radius. But we see the camera is a little bit high. I can bring it back to the defaults of unreal, so we want to go back to the viewport, take this and make it back to 96 or 88 as it was. Here I can bring back the location of the camera somewhere where it was. I think it was 75 is okay. Compile, save let's play now. Okay, now it's better. We can see everything closer. It is better for an unreal engine walk through experience. I feel I'm closer to things, I can see more, not necessarily in real life scenario. So this guys for the character. This is how we get a character to unreal and in the same time, fix the settings of the character and configure it with our level. So every time I do play It will play from the camera that I'm in. Why? Because I've got current camera location switched on, and default player start is switched off. I can't even pick it. Maybe I want the client force the character to start from this area. I go from add here, get content, and I do player start or look for player start, and Dragro, put it here. Now I've got player start. Unreal engine forces the player to start from the player start. Now I can rotate it 90 degrees, do play. This way, I started playing from the player start. So this is important for us to know. As player starts like, you know, configuring or telling unreal, Hey, I want to start from here. So from here, now, I can pick, I do default player start. This is enabled now or current camera location. So if I'm editing, I do camera location, if I am finishing, then I do current player start. So the speed guise is a little bit slow. Why? Because I'm in the exterior and interior. But if I'm only in the interior, 225 is great. So I need to find this sweet spot between both. So I need to consider like 300 to 350 for exterior and 225 to 250 for interior. Here, for example, I'm working inside the house. If I do play here again, it will play from the outside. It doesn't make sense. For me, I need to fix the playing options to be flexible and start from current camera location. When I play, it starts from wherever I am, regs if I have a player start or I don't. I hope you guys benefit from this lure, see you guys in the next one. 5. Environment Sound: Hello, everyone. Welcome to a new lecture. In this lecture, guys, we will talk about a new topic in the blueprints that is the sound blueprints, the sound that play in the entire scene. We will go to content from here. We'll go to blueprints. We're going to delete this blueprint because it was an example only to explain the UI of the blueprints. I'll do a new folder from here and I will call it Sound Underscore blueprints or BP. Double click. F here, I will do normal input, import, so I will do import, and then I will look for the sounds that I need. I will attach these sounds for you guys and I want to import the bird sounds. And it should be dot wave for it to work properly in unreal engines. So you should know this if you have it MP four converted. How do I play this sound inside the scene? Play from here? Place the sound of birds. How do I play it? I play it simply. I do right click from here. And from the sounds, I do sound Q. I call it Birds. Underscore sound Q. Okay. It's not playing. Why? Because I still did not, you know, enable or configure the sound cue to the bird's ambient. So what I want to do is the drag drop birds ambient and connect it to the output of the sound. And this way, the sound shy the birds sounds. Ex. It's playing now. I've got the sound of the birds. Or there's another way that I do right click from here and I do create queue, so I get a connect created queue with the ambient sound that we've got. And now I want to say that I want the sound of the birds outside only and inside the house, I want the sound of the piano, for example. So I will drop the sound que into the scene. I will do play Okay. So the sound of the TV is too high, so I want to scale down the attenuation of it. So let's go to Media sound audio component, and from here, attenuation, reverb focus priority. There are multiple attenuation guys. Specialization? No. Volume. Exactly. Want to minimize it till it is only the boundaries of the metahle. Here we keep it this way, 150, for example. Here we do it 400 for example. And I can do it box. It's not necessary for it to be a circle. Attenuation function. I want it to be linear. Okay, so here I've got allow specialization, guys. Here, when I've got a headset on, I can start hearing the sound from my right ear and my left ear. So it becomes even more immersive and interesting. And it's it's realistic. So this is nice for us to enable the specialization. If I do play from here. A. The sound is a little bit less. I can minimize the sound even more from the media sound and the audio component. Here, volume multiplier, I will do 0.5. Let's do play or play from here. The sound is even lower. I go to audio component, or the pitch multiplier, I can do 0.5, let's play. Even less. Last step, I'll do 0.25 from here. Let's see. Okay. Now it's playing when I come close around here. So we want to make the size even small of the sound. So we'll go to the audio from here, and I will fix the fall off distance. So we've done it as a box. Fall of distance is high a little bit. Attenuation, specialization. There should be another attenuation because we've got one with the radius of the circle and one with the parameters of the rectangle. Where can we access the other one from? This is the main one that we need, and there's another radius. Of the sound. So it's from the media sound. I make it box. There we go. And now I can, exactly drag down the box till it's small enough for us just to hear it inside the building. Okay, good. This way, it is just the exact size of the building. So I've got two components, the media sound, and the audio sound. Now I play, and it's perfect, no sound at all. Here, I didn't do collision for the stairs, I should do it. And here we've got sound. But it's low, I think. Last thing I want to do is just to go to the multiplier of the media sound. There's a volume multiplier that we decreased, the volume multiplier, I can do 1.5, for example, That's great. It's excellent actually. Here, I need to do collisions for this area. You see, these angles we did not do any collision with. Okay, great. So now the sound is excellent, and we determined where we want the sound to play. And here now this is our sound, the bird sound. And this sound que, I want to control the attenuation of it. So it works outside the house, does not work inside the house. So I want to look for attenuation, sound. Override detinuation exactly from here. I change the drawing style to box, and I want to fix the extents of the box, and here I want to minimize the fall of distance it is on the building itself on. Oh, sorry, we're dealing with the bird, now the fall of distance should be only in the in the middle. This area, for example, it can overlap a little bit with our project. Some parts of the project, not all of them. So I did an overlap on our building. We can increase it a little bit. This is an overlap. How can we see in a visible viewport? Let's do the top viewport, and we'll say lit, for example, now. Perfect now, I adjust the way I want. This is the main attenuation. This is the fall of distance. We can let it inside the house a little bit from here there and here. I will do an alt now as a copy, and this, I can make it as big as this area. I can also do this. I will play now. I need to go to perspective and I'll do play. So the sound of the birds is perfect. When I go inside, there is no sound. I go from here. Here, I can't hear the sound. Why is this problem, guys? Even if I go back again up, I want to hear the sound because on reg here, I need to configure something that when I go away, here, voice management, visualization mode, it restart when the sound goes away. I want to play when silent. I want the sound to keep on playing the entire time. Now the sound is playing here. Again, it's playing perfectly here. If I go inside here. There is no sound. If I go back outside, I still got the sound and everything is great. Perfect. Now we did sound in this area and that area. Now we want to do a different sound that is inside the house. We want to play a piano sound. We want to import piano. I'll say open. Yes. Right click, I'll do create Que. I'll put the queue inside. Double click on it, and I'll do play when silent. Make sure it's turned on. And here is our icon. I want to go to the attenuation. So I enable it from override attenuation, and then I'll do box. I'll go from the top view, top, and I will control the box till it is only inside our building. And it can overlap with the nature ale bit. It's fine. So this way and maybe this way. This is good. Here, let's do it 50 play. There is a sound of piano now. I leave outside. I hear the birds. I go back inside. I hear the piano sound, and all is great. Let's play again, double check. Now there is sound of the piano inside. And birds outside. I go back inside. Piano. I go back outside. If I go next to the window, I can hear both on the right, because I enable specialization, and all is good. This way, guys, we are enabled how to get sound from outside of Unreal engine and distribute them into the scene that is strategic and realistic. I hope you guys benefit from this lecture, see you guys in the next ones. T. 6. Simple Door: Hello, everyone. Welcome to a new lecture. In this lecture, we will be learning how to do a simple door, a pivot door. So we will learn how to open it and close it. So let's come and take a pivot door that has a rotation angle. This door is the best mesh for the topic, and we will do a new blueprint now, and we will put the door as aesthetic mesh and do some interactivity on it, so it opens when we reach the door. So I'll pick actor blueprint class, and I will say BP here door. Great, double click. From the viewport of it of the blueprint. I will go and take static mesh, and static mesh, I will call it door. Then I will take the static meshes and drag and drop them inside the door in the static mesh here. So I want to go to the details and look for the door. So we migrate to do the materials and everything is okay. So this blueprint will be red with the materials. So I will assign from here. Looks like the pivot is drifted away from the model. We put the static mesh of the door. We've got another static mesh, which is the glass. We want to put this static mesh. Let's look for this one, and then we will go and replace it with this static mesh. As we said, the pivot is drifted away. We need to fix this before we put it inside the unreal engine class blueprint. What we will do is we want to go to modeling, and we will go to pivot, and we will fix the Pivot first. Bottom, and from bottom, I will put it to the edge. Till here, for example, accept. Something else will rotate the frame, we will take and fix this pivot as well, bottom and then we'll take it to the edge, and we'll do accept Unreal engine crashed. So we will open it again. We opened real engine again. Now we want to go again to the blueprints, our blueprints and go to the content, do blueprints, deleted the blueprint itself, so it's fine. Let's double check that the pivots are correct. Let's fix them. We did fix the pivots. There you go. So these both are okay now, right click Blueprint, Actor, BP, underscore door. Double click on it. From here, I will add a static mesh component, and from here I will add the door. The static mesh, I want to call the door. Let's select the door. We want to put it here. We can't put it from here, we need to put it from the content browser, so we will look for it and drag a drop here. There you go. It's in its place exactly. I can rotate it now the way I wish to do. Or I can leave it this way. So it will rotate this way, so we'll leave it the way it is. And this frame we want to take with it. So how do we add the frame guys? We come here and we do another static mesh. Which is like a sub to the main seti mesh. We'll leave it as it is for now. We'll take the frame search, and we will assign it here. So it's here. Now, this we need to do each one unique, so I can rotate each one on its own. Make a new route, no. We want to put it here. Exactly. Now we can rotate it correctly. That's 180 degrees. Now we've got the mesh with the door frame all aligned. Compile, save. Now we've got two objects here. Now I can attach or make sub child and parent, I can call this frame and I can call this glass. Now they will both rotate together. Now when I id them together, I've got them as variables. Then I go to the evento graph. But before I go to the evento graph, There's something I need to do is that I need to tell unreal is that when I come to this area, open the door, when I leave away from this area, close the door. So I'm looking for a box collision, and this we need to fix to the parameters of the door. Realistically, some enough for us to be able to, you know, overlok with the player character. It should be big enough for us to be, something like this, to be able to, you know, open the door easily. I shouldn't really really come close to the door, to be able to open it. I can lift it high to the door now, and this is okay. This is perfect. Now the box. I want to put it all the way up till it is a unique component, independent object. This box guys is the basic of the events. I can do a lot of events through it. So I can tell Unreal here or example I'm telling Unreal is that when on component begin overlap, I come inside the component, I overlap with the component. Give me an event that is called begin overlap, compile. Now I will take from it another node, and I will call cast two BP first person character. Great. This is what I'm going to deal with. Then I'm going to get the glass and the frame, which I want them to be rotated, so get then I'll drag from here and I'll do slative rotation. I'll connect both to the same node, and I'll connect this here, and I'll do compile. Here we must connect the other actor with the object. I should not connect this to this. It's okay. Compile. Perfect. Now the rotation that I want to specify, I want to look on the door and how's the axis. I'm going to click on the door from here, and I want to see the axes, and I wanted to rotate around the Z right and left, I'll go to the Z and I will do 90 from here. Okay, good. Now we've got everything organized. Now I want to get the blueprint of the door. I want to place it here before. I want to try it here, and then I want to do play and see if it opens. Okay. Perfect. It opens. But the glass is not opening with the frame, and the door also opened suddenly. It did not even take its time to open. So that's the glass. Took up the frame. If I do it this way, compile, play I need to leave the box. Then come again. The glass has worked and it's rotating the glass with the door. Problem solved. Here, everything is okay. It's just a matter of hierarchy. So the door is opening and it's closing, but there is no animation. So what I want to do is, I'll do right click from here, and I'll do timeline. Add timeline, and I will call it rotation. I want to bring these together here, get them closer to here, disconnect this, connect this here, and connect this here. From here, I'm going to double click and I'll do add track, and here I will ask for float track, but there is multiple tracks that I can pick from. F here, I'll do shift from here, I'll pick a point, the time should be zero and zero, and the value should be zero. No, zero, sh be zero in the beginning. And then shift and click, and the time should be one and the value here should be 90. I'll Zoom extent here. And then I'll take these two points, and I'll do right click and I'll make auto. Now I've got a transition compile save, and I will call it here F two, and I will call the track rotation or angle. We know it's going to be rotation. It opened a new thing. Now we have got an angle here, I connect the angle. No, I can't. What I need to do is, I need to split, strut pin, and then after that, I'll connect the angle with the Z. Let me get this here. With zt. Okay compile, play. Okay. It opened, but in a erred way in a different way. What we need to do is to fix the rotation now. So the fix in this case is that we attach both objects from three D Max. What we want to do is to open Max and fix this inside Max and then import it into unreal engine. I think it should be fixed then. I'll go three D Max files, Ireland Farm retreat. Okay. Great. This way, the door is okay and it's working well. Now I want to take it inside our blueprint and put it inside there. Blueprints. I'll take BP door, and the BP. I want to go to the viewport and replace these meshes. I'll add track and I'll do static mesh and from here. This is the door, and this is it exactly. Now I can rotate the colligon. We rotate it this way, now compile because in the logic here, we've got a problem is that the reference is gone, so I will get the BB door, exactly, get door, and I will put the target here. Now compile, it's working well. Save and play. Door is not moving why because it's the statics. It's not the blueprint. Here's the blueprint. That's the statics. Let's put it there. Delete this one. That's the blueprint. Let's Let's come forward. It opened perfectly. And all is working well. Mainly, it should be like this, and now we play. It opens the way we want. If I want it to open to the other way, then I go to the timeline here, double click, and I go from here, and I do -90. Zoom to fit, compile. Now I do play. It's going to open to the other way around. All is going good. But this way, guys, the door will be stuck. It will open and it won't close again. How do we close the door again? As I go back to the door BP, That's a mesh, and that's a blueprint. I go to the door BP and I go to event graph. And I click on the door I click on the box, collision box, and I will add another event that is called on Component end overlap. Okay. Before I put reverse, I want to do Control C, Control V, connect those two as well. This with this as well, and I will do reverse. So it traverses the animation. Yeah, I think this way is okay. Now I play. Door opens, I go back, door closes. Perfect, fully functional door. Now we want to replace our mesh with the door that we've got delete. Hold on hold on a second, guys. This was a group. So let's just double check that I did not delete the group itself. Yeah, exactly. This is a group. It is a group, right click group, remove from group. Now I can delete it. I make sure I did not delete the entire group while I was just intending to delete the door. That's the door, so I will take it, move, rotate, and I will fix it with the position of the actual door. Now I do play. Door opens perfectly. I go inside, door closes perfectly. Everything is functional. This way, guys, we can open the doors through blueprints and real engine. I hope you guys benefit from this lecture. See you guys in the next one. 7. Sliding Door With Curtains Animation: Hello, everyone. Welcome to a new lecture. In this lecture, guides, we will talk about sliding doors, and we will combine it with curtain animation. So we will understand how to time this together, and we will learn how to move the door with movement, not with rotation. We'll take this door as blueprint, a new blueprint, and it's preferable for us to have these two elements attached together. Before I open anything, I'm going to open Max and I will fix the window and reimport it to Unreal. So everything is 100% correct, and I don't have any difficulties inside Unreal engine. So I want to go where I found the project and I located it, Island Farm retreat. Let Max open. I'm going to attach components, and I will put it into Unreal. So I'll go to three D Max, Drag Drop Island Farm retreat. I'll go to the window and I will attach with the frame. Good. Now, this window is attached, I will go file file export selected, and I want to pick the place that I want to export to is where we put the file. FBX export, and we will export here BP, or without BP sliding door. Okay. We've exported it as FPx. Now we want to import it inside real engine. I will import here. These materials, we can delete them because we've associated other materials, the correct ones to the objects and these static mesh options. I'll import the sliding door now. Make sure all the setups are okay, and the parameters are okay. Before this guys, let's cancel. I want to go to Max and I want to make sure that the pivot is okay, so I want to affect pivot only, and I want to fix the pivot. This way, the pivot is following the Gizmo, and now I can export selected to sliding doors on top of it. Yes. Okay. Now I'm going to import inside real engine. I've opened two real engines. Let's come here and import sliding door open double check. Import all. Here's the sliding door that we've got. We want to change the materials of it now. This is a blueprint. Let's take this copy. We put it here. And then I'll take any metal frame and I will associate the second material to it. I'll close it from here now, I'll go back to blueprints. I'll drag drop the door this way. And this sliding door, we need to fix the pivot of it. From modeling, I will go to Pivot. After I fix the pivot, I'll do accept. Z with Z x with x, y with y, everything is organized. Now I'll do right click from here Blueprint class, and I'll do a new Blueprint class, and I'll do BP underscore sliding door. Sliding with no space door. Now I can take these two materials and delete them because of associated new materials to the window. Now I can take these meshes and put them in the geometry, but let's finish first from the blueprint. So I'm going to add the new static mesh here, and I will call it sliding door. And I will add a static mesh from here, so I will look for the static mesh. Then I will go to the Blueprint editor. Drag it drop here. We've got the sliding door and everything is okay. Compile. Now I'm going to do the same as the previous lecture. I'll do box collision. So we can interact with the object. I'll bring it from here, and I will enlarge it this way. This way is good, and now we can scale it till it fits the entire character. This is not necessary, but we can do it. So I will go to the evento graph now, and I will take on actor begin overlap and on actor end overlap. I'll delete those, and here, I'll do the same cast to BP, sp two BP first person character with the object with the other actor, Control C, Control V. We put it here because we want the inverse of the movement and from here, I'll take first thing first let's take the sliding door variable into the viewport and then we'll drag from it and we'll put set relative location this time, not rotation, because we are moving with distance. F here, I want to connect to timeline. A timeline, I'm going to call it location. Click on it at flow track from the flow shift first 0.0 by zero. Second point. Let's do two by 1 meter. Let's take both of the points, make them auto compile. Let's call here amo. Event graph, and then will finish the update with the set relative location. The location that we wanted to move is on the x by 1 meter, so we can do -100, for example. We can do split struct pin and connect it to the amount. Compile, save This is the attic mesh, so we want to put the blueprint in the viewport. That's the blueprint. This is a static mesh we want to delete. Now, nothing is responding. Let's go back to the sliding door and come here and see if we do 100 here, for example. Fit, great, comple save. Let's try now. Yeah. Exactly. 100, it's moving. So a couple of modifications we need to do now. So we can make the speed, for example, the value two, but the movement we want to do 300, so it moves 3 meters the width of the door. And from the event graph, if I fix it from here, it will be fixed from here directly. No need to fix the result manually, and from here, I'll do the reverse, compile, save. Let's check. It is stuck like this when we are inside, but it's opening the distance that we required. How can I fix this, guys? I can fix this making a float from here, and I can call it float and the variable I want to call it or distance or displacement. I'll take the float from here, get, and I will take from here, multiply and I will multiply this by the amount and from here, I will connect it to the x. The displacement here, I will first compile the variable and I will put here 300. Compile, see. Play. The door went crazy. Apparently, it's not working. So let's see what else can we fix to make it work. So let's come from here and make the location 300-1 because we've already assigned in the float how much we wanted to displace. Let's now. It's working better. Let's do the t three, and let's do here. Let's see. Double click. The main problem, I think, guys is because we've put the box inside the static mesh. We should put it outside the static mesh. This way, it will work perfectly. Let's play. Perfect. It worked perfectly. So basically, it was an error before just because we had the collision box within the static measure itself. And now when I leave, it should come back. Awesome. So now we've got the movement of the door correct 100%. So I will take this door and I'll keep this. I'll remove from group, and then I'm going to delete it and delete the frame, and then I will take this and put it replace it with the door size and the door location. Here I've got an opening, 100%. Here, it's closed, here, it's a bit open. Let's fully close it. Now it's 100% correct, I think. Yes, it should go inside the void that we designed for it. Now we and we check Still this should go a little bit down. Play. Good. Now, the door opens, the door is too fast, so we need to fix the time, make it to compile save, go back, do. Perfect. That sounds like the opening with the perfect timing. The door is closed now and everything is okay. Something nice, guys, we can add into our blueprints, and especially that these blueprints, we can do them only once and copy them and paste them to any project we want, so we can make our life much easier later on. Something we can add. I'll go to the sliding door blueprint. And I will go to the event graph, and here I've done a float that's called displacement. So I can show from here to make it visible in the details. You see, guys, it's like displacement 300 from here. I can make displacement 100 without entering the blueprint and just, you know, testing from the viewport. So now we got only 100. So if we do, for example, 500, then the entire door will vanish. If I do 350, for example, I think the entire door will go inside as full. So let's see. Okay. We've got collision here. Now it's opening and the door is going inside as a full amount. Now I go back, it goes back again. So I can control anything I want in the blueprint from the details of the blueprint that is outside, which is very helpful later on, and when I give it to any person after me, they will thank me because it's going to be something easier for them to deal with. Something else I want to talk about is I can control the width of the door. But you see, I can control it to a certain point because to a certain point, the proportion is broken down and destroyed. So if I want to fix the door, it's preferable that I fix it from here, Again, to a certain point. But you guys can see that it is better if we have the doors that is 100% correct. So what we can do is we can do a much like a bit smaller door on Max and bring it to unreal, and based on it, we can scale it up and down, which is no problem by then. But this door is very wide, so it will show the frames collapsing. So that's how we open a sliding door in unreal engine. Now we want to learn that if I got the same blueprint and I want to duplicate it on multiple doors. I want to put this blueprint into this sliding door that is smaller here, for example. How do I do this, for example, inside this blueprint itself? So simply, I do from here, double click duplicate. Why do I duplicate? Because if I edit the same blueprint, it will edit all the blueprints everywhere. So I want to edit a new mesh. So I'm going to come to the sliding door here, and I'll do sliding door 01, for example. And I'm going to drag drop to my scene, ID guys. If I've got two parts attached as a one single mesh, then I can simply look for the model and search for it. There we go, we've got the model here, and we can go to the blueprint that I've got here, edit blueprint, and I go to the static mesh, and I change the static mesh with the object that I picked. And I make whatever adjustments I need to make further. So it opens from both sides, compile and also I can add another mesh. But the basics we've got now and we understood the common sense and the logic. So we don't get any errors. It's preferable that we've got the glass and the frame. So here we assume that the frame here is one mesh with the glass. So when I take the blueprint, I get the sliding door, and we've got a smaller mesh that we can move in the blueprint and interact with. So I can exchange the mesh. Let's look now. We've got the mesh here. And I want to do play. You see how it opens. It needs to be fixed from the blueprint itself because the pivots and the axes are different for this object. So when I go to the event graph viewport and we want to rotate this object. It went back. I, I think what we will do is to rotate the object 90 degrees and rotate the collision with it or scale it like this. Cope save rotate now 90 degrees and Du play. H. Perfect. Now it's working, but all what we need to adjust is the distance. We'll do 150 or 160, for example, and now we do play. And it opens the way we want or even we can increase it to 200, for example, and do play if we want it to open in full. We have to get back and come closer and now it opens the way we want, as you guys can see. Ideally, the glass should be attached to the mesh, so it moves with the mesh. An object I want to move, it's preferable that I've got both objects attached together. She we saw here, we've got a blueprint here and now we've got another another concept, another blueprint that didn't take us much. So Blueprint can take us time to build the thing the first time. But then it cut down the time because I've got a base that I can move from and I can duplicate and copy and do a lot more with it. Okay, what else do we still got to do? We want to connect the curtain that we've got. You see guys here, the curtain is already running, either the door is open or closed. This is not realistic. We want to move the curtain alongside with the door while it's open. We want to make sure that the curtain moves only when the door is moving. How can I do this? I want to add the curtain into the blueprint of the door and make certain interactivity. So when the door opens, the animation of the blueprint starts and when I close the door, the animation blueprint stops. So here the curtain guys is running and looping. What does running mean? When I untick running, when I do play it, the curtain does not work. And here the sound is too high. Let's put it down to 0.5. And the pitch multiplier here will 0.5 as well. Here, the running, if I wanted to work or not when it begins. Looping if I wanted to keep on working even when the animation stops or if I wanted to stop when the animation stops. Now I want to take the blueprint of the window here, and I want to duplicate and I want to put the curtain inside it. So I'll do a duplicate of this blueprint and from here, I'll do F two, and I will call it underscore curtain. Okay. And I want to bring it here, not this one. This is wrong blueprint, delete. We want to take this one, sliding door. So now we duplicate curtains, sliding door curtains. And we get the door like this. Now we get inside the blueprint of the curtains. And from the viewport, we add one more static mesh so we can add a blueprint. But guys, mind out, it's not static mesh, it's geometry cache. So we add a geometry cache as our curtains, we don't add static mesh. Otherwise, the animation won't work. Nice, and now I want to take this mesh, and I'm going to search for and put it here, apply, and I want to fix the orientation of the curtain and the scale of it as well. Compile closes the blueprint. You see now it's on the other way around, so we can fix the curtain. From the viewport here, we can move the curtain even if I'm outside the blueprint. It's okay. So I'll bring it here. So we can simulate the same positioning of our curtain. I'll take the material of the curtain that we assign to and we go inside the blueprint. We assign the material here. Perfect. It's two sided. Now it closes all the gaps between the mesh, and I'll take the curtain from here, or I'll take the blueprint, all of it, and I will try to put it the same location as mesh so I can control every according to reference. Grid. Now I take the other blueprint here and I'm going to delete. We have it here in the content browser. Don't worry about it. I'll look now and try to scale my curtain according to the curtain that is there. So I will go to curtain from here and I will try to enlarge it till it fits. This way most approximately. Now I want to go to the animation, I'll hide this and then this curtain, I will delete control g. Now, guys, all is good, and it's working perfectly. Okay, guys, now what we want to do is to make the curtain work and play. When the door opens, after the door opens a bit, the curtain plays, and when I move out, the door closes and the curtain finishes the animation with the closing of the door. How can we do that? We want to go to the blueprint that we've done. And there are things I need to do here. First thing, I want to go from the viewport. I want to go to the curtains, the part that is responsible for the curtain, and I will take the curtains here, and I will disconnect here. I'll do the reverse a little bit different this way this time. So what I want to do now guys is drag from the curtain. I'll do play from start. Play from start, I can connect it to the end of the code like this, or I can connect it in a different way. The different way is that I organize my orders in sequence. So I can call a node from here called sequence. Sequence. And I connect then zero with the location, open the doors. Second thing, play from start to the curtains. Compile, Save. Let's see what happened. The curtain is running. We need to go to the blueprint, and I need to go to the viewport and uncheck running and uncheck looping because we're going to play it for testing only for now. Now we play, but let's move away. Play. Now the door opens, the curtain plays. Nice. Very nice. I went back. Nothing happens when I go back. And the door did not close as well. Why Because we unchecked the actor end overlap or on component end overlap. So we'll go to the event graph, and I want to do a delay before the play a bit. So it is realistic. So try to open the door, and after we open the door, something happens. So we'll do 0.7 delay amount, and I'll do another pin, and I will connect it to the delay, and I'll connect this with the play from start. I'll disconnect this. L et's put the curtains under the play from start. That's the delay alongside with the play from start. All right, good. Now I want to take the code, and connect delay, do another delay, and I'll do this delay 10 seconds, for example, and I'll connect to the reverse. Compile say play. Let's move away. The door opens, then the animation played got delayed a little bit. The door closed and the animation stopped. 100%. God bless. Close the door and the animation of the curtain stopped. You see, each time I come close. I get this. Beautiful. So now I know how to play an animation. So it did not stop together. Okay, so here we need to do a bit of an edit. Let's play again and see what is the problem again. So we played it. First thing, the delay is too long. This should be 0.5, for example, Compile, save, let's start and do play and see if we encounter the problem. It played. I think we could also do the delay 0.4, Compile, save, let's try. Play. Nice. 0.4 is good. I went further out of the trigger box. Let's see if it stops. A emission stopped and the curtain stopped when I come here again, it plays again. Stops again, and everything is perfect. So there's no problem at all, and everything is correct. So this way, guys, we took a lecture. We understood how to do a sliding door on blueprint and how to connect with a curtain or any animated object that works in parallel with the time. Look, final look on the viewport. And here we don't need the end overlap anymore because we've got a delay and delay in sequence, and everything is okay. We did play from start and same code is working perfectly. But we did with new node, we called it sequence here, and this gives us a sequence of events that happens after each other and with each other. This is for the sliding door, guys. I hope you guys benefit from this lecture. See you guys in the next ones. 8. Menu Creation Front End: Okay. Great. So we took an idea on the blueprints and we did different types of blueprints and now we've got a basic fundamental and understanding of what is blueprints. Now we want to talk about menu blueprint. In Unreal engine, we call it widget blueprint. So guys, what is widget blueprint? We will explain it all. In the end of product, this should look like a menu like this, guys, that we see all the buttons that we will do. So first, we will start with Tab to edit, so this will be only shown in the screen. When we click on it, we get an animation of these tabs, as we said in the introduction of the Blueprint chapter. And here I can put the words and the icons for all the different materials. So this guys I did on Photoshop and I put all the files for you guys to be able to access it, and download it and be able to follow along or if you want to use them into future projects later on. Now these are the materials that I've used. They are all exported, so we can fix everything in real engine and work with them. So we've got different materials, we've got white icons here. Like basically everything you guys need to fix the widget with. So that's the end product and how it's going to look. So first thing first, we've got all the files, and you guys, as we said, you can enter, see the files, or download the files. So here is the materials, used materials, white icons, all is available. So we're just locating the file, so I can attach and upload the folder for you guys. And I want to also add the photoshop files. Let's look where they were. So Photoshop files are already here. If I scroll back till I get the icons, exactly. I've got the two photoshop files, so you guys can download them. So we want to put and organize all of this inside real engines. So now we want to go to real engine, and I will do a new folder here, and I will call it Widgit. And inside Widget, I will do right click, I'll do folder, I'll call it images. Inside images. I will import the icons that I've got. Adobe Photoshop. This is PNG file. I'll take the PNG file for now. I'll do right click from here or not from images from here from the widget, I'll do right click and I'll do Blueprint class and I will ask for Widget blueprint. Or Y from here? We can do from here user interface and Widget blueprint. Both of them work. So User Widget, I'll pick on it, and that's it, and I'm going to call it menu. Db click. We get the user interface of the widget of our widget. So I did the design guides on Photoshop to be 1920 by 1080. So you see to verify, so we need the widget to be the same size as our Canvas size of photoshop. And that's what we prefer Full HD. That's like the medium above this, certain computers turns it on below this. It's good, but it's going to be low resolution. The main user, that what we need is Full HD 1920 by 1080. Here I've got icons and commands. I can get them. Here is the hierarchy as the same as photoshop, the layers. And here, I've got the layers that I can organize and put together. Here, I've got the screen size if I'm exporting for Apple or for certain laptops monitors, so it's smart. Here I can enlarge the size of, of course, right to click, so I can navigate from here. I can enlarge the size of the Widget 920 1920 by 1080. So this is the size that we want to work with. Okay, so now I want to get a canvas panel from here. Drag drop into our sea. When I dragged and dropped it, it already took the size of our widget, which is full HD, nine by 16 ratio. Now there's a boundary here that we can work with before it was open. Okay, great. So what I want to do now is I want to import an image from here, so I want to go from common and I want to do image here. And the image here from brush here, I will pick my widget image. And here I will do size to content. It is the same size as my widget now. I try to lock it exactly and snap it to the edges. I go from the tint, I do 0.3, so transparent, it's like a layer that we can put things on top and use it as a reference. We can call this background. F two or BG, underscore trace. Background trace. Compile. Now all is good. And the anchor guys, this is one of the most important things. This is how I tell unreal how to summon the screen. How do we minimize the screen, enlarge it, make it bigger. We bring it here, we bring it there. You see, every time the panels are docking differently. See how when we enlarge it how the menu is different, we get more options. This is a shortcut for the anchors. So it's like I'm telling unreal where I want it to anchor. So I put it there are some things I want to always be in the screen, so I do it centralized. Some things, I want it to be in the corner, I want it to be hidden to a certain percentage. So this always, I like to do it in the middle like this. So I can control it and it opens every time with me. I open a screen, whichever screen I open it with. So I want to get more images and tabs now. So the next icon, I want to get is image. I'll get another image from here. And this image, I'll import all the icons that I showed you previously. I'll do minimize here to the viewport, and I'll minimize from here, and I will take these tabs and the edit tabs hide and the kitchen as well, and the UI back menu and the UI menu with text. Let's take the one without text. Or we can take, let's take the one without text for now. Now we look and see our widget. And I want to put the tab to edit. So I go from the brush here, I put it in the brush, tab to edit. And this tab to edit, I do size to content. So it is the same size as my button. Now it's snapped and all is good. Of course, I can always size to content, guys and make it the same or I remove the size to content, for example, here, exactly. If I remove size to content, let's get an understanding. So I look at the image size, 145 by 63, I can put the same size here, 145 by 63. So I get the same as the size to content. Same place. And I go to anchor and I put the anchor in the middle. So I want it always to work. So I can either do size to content or I can take the scale and put it here. So next icon I want to get a tab to hide. So I'll do F two from here, and I will call this tab dit. Alt Control C control V. It's the same size. Tabter edit as well. I only change to tab to height. Tab height. We look now at tab to height. They are the same size. Compile. And this F two, I call a tab height with capital letters, so it's visible. Okay, good. So now I want to add the living room and the sitting room and the kitchen and the mita hall. But here, guys, we want to add these as buttons because something after this will happen, you know, I will click on the living room, then I will get the menu of the floor wall actors. So I will get button from here. And I will come to style, and I've got normal hovered and pressed. There are three different visibilities for it. So I open normal hovered and pressed, and I come to first thing, I want to get the living room. I want to get the living room inside in the appearance, size to content, and here the same, I want to look for this, I want to put it the same in hovered and the same in pressed. L et's remove size to content, and here we can put the same size as the image size. It's preferable because then we can size from here manually. But when we do size to content, we can't. So it matches. Good. I can always remove the grid snap and, you know, make sure accurately 100% that is matching. When I do size to content, I can't enlarge or scale down. But when I've got the size here correctly, then I can easily, you know, fix it manually. So here from the normal, I want it normal as in the hoard, I want it tint, for example, and the tint, I want it to come to the color of yellowish a bit. Okay? This is Daubert. And on the press, I wanted to become orangish a bit. This way, we give it the color a little bit on orange. We see how their color click hovered pressed. When I do hover, it's going to be yellow when I do pressed, it's going to be orange. So this guys, what do I call it? I call it F two, and I say, but. So that it's like button living room. And then I do control C control V. As we did the previous one, we did the same one, but we changed the image of it and even the colors are okay. Control C. Remember something is that when we click here, we want to say anchors, all anchors should be in the button middle. Then Control C, Control V. Control C, Control V. No worries, we'll take another button. And we will put the kitchen bottom into it. Norman Hard press Norman Hard press. Compile, and now we want to fix the size four oh one by three. Four oh one by 63 here and we'll fix it to the same size. I make it a little bit bigger, so it's under it directly. In the living room. Here I've got living room. The second one should be weight. Let's the sitting room. Let's change the living with the sitting sitting sitting room. Kitchen, and now the as the final button. Make sure that the anchor of the kitchen is correct. Control C, click here, Control V. Control V. I have to click inside the Canvas panel for us to copy the button. You see now because we did it freely, we can fix it, but if we do size the content, we can't. So that's a tip. Last thing, we go to Mitahle, and we do the image. Compile, Now, of course, the icons guys are gray and these are white because simply we can fix gray and make it white. So I can make the normal white. Okay, great. So now, I want to name them correctly. So this button should be Meta hall. So it's easier for us to find them. But Ma, for example, or M. This one, sit. This one would be kitchen K IT. And we can align them next to each other to make things clear and more organized. So this way, everything is organized. So I want to do another Canvas now, another Canvas panel. So we did these icons. Now we want to do the ones on the top, so I want to take another Canvas panel. There are many things like a checker, name slot, progress bar, you name it, whatever you need for games. So I will call Canvas panel, another Canvas panel. And this is the first Canvas panel. We sho name main Main. This is the main one. And here I want to call it two living. But CPsloc with living, exactly. This is the living canvas. And then I want to go from unreal and say tab here widget. B menu. This is it. That's good. But let's see where Okay, wait. Sorry, guys. So first, we need to make it as the same size. It's a container. It should contain all the icons that are here. Perfect. Here's another canvas panel. We call that living. And here I want to do image. And this image is the background. So this for sure is the Canvas. You see the Canvas the anchor is here. We need to always pay attention to the anchor because we can easily forget it, and it won't show. So we're not going to go with size to content. We're not going to do it manually. We're just going to type in the number 392 by 181. And now we can fix it manually because we did not do size to content. I've got nothing with size to content, guys. You can do it, but many people does it and then end up having problems. So I'm just, you know, letting you pay attention to it. Okay, good. So now, this image, I'll say F two from here, and I will call it BG living. Good. And this one, I'll do compile perfect. So this one for now, what we can do is to minimize the opacity of it till we get something here. So now we want to get text drag drop inside our Canvas. And I will edit the text from here, and I will call it floor. And I can also change the text parameters from here, if I want to change the font, if I want to change the size, the letter spacing, the screw amount. I can animate these things as well. The shadow it's like photoshop, like a minimal photoshop. For now, that's the floor, this font is okay. The size we want to fix ale bit. So we'll do 16, for example, let's see. 16 is good, the color we want it to be black. And this should go above the BG living, like this. And now we can constrain down the boundaries of the text. It does not overlap with any other text, control C, control V. Now, this one, we call it wall. Contra, Control V. We call this one actor compile. Play or wait. Before we play, let's fix this correctly. Okay. All of these now are here. It isn't still the time to play yet. We still have some work to do. Here it's actor text, or we'll just leave it as text as long as I can find it here under the BG living, but here, let's see if we can have something more optimized to call it. Yeah, we can do this. We can do as for the text, so we can find the text for the associated panel. But I can't, so I'm just going to leave it as as text. So now we will do compile, and we will get the shapes of the icons and of the materials, guys. So we'll choose the used materials of this folder that we got here, and we want to try to drag and drop the entire folder and unreal and see if it calculates or doesn't. So I'll drag drop used materials. There we go. Use materials. Perfect. Perfect. It has organized our entire folder structure. So this is the normal original lick Huard. Okay. Good. So now they are all available here. So I want to go to Unreal and start fixing these stuff. Something basic guys. How did we export these? We went to material by material, crop, the size of the Canvas to this material, same coordinates, same spaces, control shift W, and then export with these image sizes as PNG and export, and that's how we got these. These should be transparent backgrounds. So now we want to put the icons of the materials. So I'll pick them as buttons because when I click on them, certain things will happen, and I will come here and go to original and I'm not going to do size the content because I want it exactly as is. So 169 by 169, That's a little bit big. Let's do manual scale till it gets as close as possible. I think it's going to be 45 by 45, even less maybe 40 by 40. I think 40 by 40 is okay. Let's minimize the opacity C. No I think less than 40 by 40, I think we need eight by eight. Let's try this one. 36 by 36, I think should work perfect. Yeah. One. Good. This is on the normal. On the Hart, I wanted to look this way. And on click, it should be this way. So it should be draw as box, guys. This is very important for it to change between the materials and be able to work. And I'll do draw as box. And on the clicked or pressed. I want this one. Draw as books. This way, it's perfect and it's working 100% correct. I do compile and save. Now I want to get a second material. This not a floor, this should be a wall. Concrete gray. Concrete gray, I believe let's check the reference. Okay. So this concrete should go with the floor that is here. So I'll take a copy of it, Control C Control V, another one, and I'll put it here, and I will put the materials that I will change for the floors. We'll go to use materials, fabric concrete green. So this is one of the things that we will use for the floor. Let's put the original here, the hovered here, and the clicked here. You see, everything becomes much easier, guys. Once we do it the first time. Control C, contro V, then we can call them all later. The second one should be marble. This is the original. This is the Hart, and this is the click. Control C, Control V. This is the third material. Original hot click. This is for the floors. And there's something guys that is very important, and it is two things. First thing, the materials, I can put the icons of the materials and then look for materials in the megacans that looks the same as these materials. It's okay. So if I couldn't find the same textures or the materials, it's okay. The strategy that are we usually using is that we decide what are the materials that I want to choose. After I choose the materials, I take the icons, which usually when I download textures from megascans, I get like an icon. So this icon I take and put it into photoshop and edit the background of it. Make sure there's no background behind it, and then I can bring it here and start working with it. So I can do either or. Now I want to go to the walls and see the materials that I've got and see the content. Here, I don't want the wall. I want to do the sofa. Leather is one of them. Okay, great. So now we want to put the actors of the music and the light. And also, I could do the same as here. It's okay. There's no action happening when it's hovered or actually here, the normal light bulb, and I can make it white. All is possible. So I've already white icons. We can take these here and take the white icon when I hover over it. See, guys. It's very important for us to call everything because sometimes the icons does not show properly in the content browser. So that's the light bulb combined. So here it shows that the light bulb is black, then white. Then when I click on it, it becomes yellow. Same thing for the light off. So first one, light bulb off, we size it a bit correctly till it fits. Okay, and this way, guys, this way, we finished the first one, and of course, we want to call the rest. The rest, we will do them as a fast forward video and do all the icons same way we did this one exactly. And this way, guys, we finished our entire menu and how everything looks as a design. With the clicks, we learned so many things in this lecture. We worked a lot in this lecture, but in the end, this all works for us knowing new things, you know, This is very important and many things we do from the first time only. Now, of course, we did all the front end of the UI. We'll do the back end. We'll put it in another. I hope you guys benefit from this lecture, see you guys in the next one. 9. Multiple Saves And Level Optimization: This is for the material. For the other thing, I need to know something and take it under consideration is that my widget and all the commands that I've done, it has to be in a final level. So what do I mean by that? So for example, I go to content. Last time I came and I saved my project lasting. Every time I was saving, it was telling me to save a new level to save a new level, save a new level. Til it was okay for unreal to close, so it was seven different levels. So I don't mind because in the end it saved the data, but it's unorganized. I can't have eight levels for the same level, right? I can have as many levels as I want as long as it makes sense, but not the same level. So for example, that's the main level that I've done the blueprints on, and I played. And then after that, what I had to do is to save, and I had to put another level on Main seven, for example. So last save was done on Main seven. So when this thing happened, the blueprint interaction won't work in the widget in the main 07. So example, if we come to the experience that we've done beforehand, and I've done all the blueprints and the interactivity on main level auto six. So if I go to the main level, it gives me the same result as Auto six. If I do play, it plays and everything is okay. If I'll do F 11, and I'll do tab, so I can change things. So I'll get inside. And I did not remove the jump, I kept it. So I'll go to a living room, for example, and I want to change the floor or the sofa, or I want to make any interactivity. Nothing is happening. Why? Because the interactivity was done on a different associated level. So that's a very important thing I need to have under consideration. So if I go to Level six, the one that I've done the blueprint on, and I walk towards my building. Here I enter. I do F 11 tab living. Now I change it changes, right? So it needs to be the same level that we save or at least the widget that we've done. It needs to be done on the same level that we save on. Otherwise, it won't work on any different level. So I'll go to window levels. I've got the main level. I think this is the main. No. This is the last level that we're done is main 07, or is it main? Oh, I think it's mains. So this is the main file that we will be working on main level, and the widget is here and everything is okay. So I am at the main, so I will save as and save, and everything is saved. So for me to overcome this problem. Before I do Widget, I do something that is very important. This video, I will cut into a separate video so you guys can understand this separately. Before I build anything and get problems, I'm going to try to solve the problem beforehand. I go to content and I do new folder, and I call it levels. This is before I do the Widget interactivity. I go to file, save current level as I go to levels, and I save it as main. Save. Now it's saved on the main. All good, hide show. It's there, greenery is there. So it did not disconnect anything. So now we've got another level here. It's called Mine. Save all, save. Now I go to the content, and these levels, I delete them. Delete. I no longer need them. This is how I clean everything. I want to save this level as, I go to it, and I do save levels or save all. Sorry, save current levels, and I will call it here landscape. Save. So I go to the levels and I've got the landscape. Double click on it. I am inside landscape. Okay, there's no light here. I was just double checking. So now I've got two organized levels. This is the main that we were working on. I'll go to levels. I'll take the main from here. All great. I'll delete this one. Save All save, and then I'm going to add it again to the main with landscape name now. So this way, my landscape is great, and I go to the landscape change streaming method, and I do always load it. So landscape, right click, change streaming method, Always loaded. Save, save Good. So now I go to the content that I've got and I can delete these two levels. So mind you guys, there is some cinematics associated to it, so I will lose the path of the animation, but it's okay we can fix it later and show you guys how we can fix it just in case I was getting a file from someone and the animations were disconnected. So we'll teach you how to reassociate cameras to the animation. So now I'll do force delete. And I'll delete the main data here. I'm a presets. I will keep it, and already I am in the main and everything is okay. And I've got a folder that is organized and everything is there, and I can summon and call them and I can connect them together with the levels editor. So this guys for the levels that is related to multiple saves and widgets. I hope you guys benefit from this lecture. See you guys in the next one. 10. Menu Creation Back End: Okay, guys, so we've done the front end of the widget in the last previous lecture. Now we want to do the back end so we can let the widget work. Can we drag drop the widget into the scene? No, Because as simple as the widget is two D, not a three D object. So what we need to do is we need to do another blueprint so the widget can appear into our screen. So we'll do play from here. You see there's no widget. We want the widget to appear. So we want to work on enabling the widget. Okay, so how do we add the widget now in a suitable way? So we do right click Blueprint class, or we do open level blueprint and do the widget there. But for everything to be organized, we'll do a class, and we're going to call it BP Underscore M menu. Double click on it. I've got the scene root here, and I've got the event graph. I'm going to delete the other events, and I will take from the event, begin play, and I will say create Widget. So widget is created now. Which widget do you want? I want the menu Widgit. And I will say from here add to viewport. Exactly target with return value. Compile, save let's drag drop into the scene. And do play now. Perfect. Now we've got our widget into our scene, and all is okay. So if I do with 11, my widget is exactly to scale. It's exactly the same size as the menu. Okay, great. There is something guys we want to hide. So we'll go to the menu, and from the main BG trace, we want to hide the BG trace. Okay, Cp play. Let's see. So now background trace is still there. So we can just delete it because we are done from everything else. So replace with it. I'm just going to delete it, guys. So it's gone now, compile, play. There we go. Now it's gone. We can delete it. Yes, because we don't need it anymore. We've traced everything. And now we can make the visibility one. Or 0.8. Compile play perfect. Now it is 100% clear and everything is okay. I can decrease the opacity, 80% or 90%, but for now, I'm happy with what I've got. Okay, so now we want to advance our widget furthermore. So before this, when we do play and we do shift in F one, look here when we hover. We can get the icons that We program them. You see here we did not continue the rest as the living room and the kitchen. So the metal and the kitchen should be as the sitting room, so we'll go to the sitting room, orange, yellow, white. We will take copy from here, and I will paste the color here, paste and here as well. And from here, I'll do copy for the color, and I'll do paste here and paste here. Compile, save play. So now when we do shift and F one, when we hover, we get all yellow and clicked is a different color. Here, everything is okay. When I click, I get orange or yellow look. So this way, our blueprint is organized and our widget is fully functional. So you see here we've got a problem on the click. So let's go to the menu and go to this icon and see what is the problem. So in the press, we need to fix the music. Compile save, so now it is fixed 100%. Shift F one, click, yellow, click, yellow. Everything is working functionally, and all the buttons are working perfectly. Great. So that's for testing. So now we want to update our widget. So I want to go to the Blueprints I've done. I'll go to BP M menu. And from here, we want to update things more. So what we will do is get player. Sorry, player controller. And from player Controller will do enable input. This player Controller owning player, and we'll connect this from here and this from there. Okay. Now I can do the command of the tab that enables the widget, so I'll do keyboard. Tab. There we go. And from the tab, I'll do flip flop. So the first time I click, it does and the second time it does something else. And from here, I'll do se player. No, UI only. Set input mode I only, and then we'll connect this to player Controller. And from the flop, I'll do set game mode game only. Player Controller as well. And I can make things more organized and just connect it this way if I want to. Also, it could work. This way, when I do tab, it will work I only. When I do tab, again, it will work game mode only. Let's play now. Okay, but we want to add the mouse because the mouse is not available. Great. So what I will do now is, I want to add the mouse, so I will type in show mouse. Let's uncheck context sensitive exactly. Sit show mouse cursor. And the player target is the player controller, and I want to enable it. And here, guys, sorry, it needs to be set game input, game and UI, not only UI, game and UI here. And here copy and paste. And then we uncheck the show mouse cursor. Compile, save L et's play now. I come here. I do tab, I get the mouse, and everything is okay. If I click tab again, the mouse is still there and I click I can click on anything I want. Here, guys, when we're doing tab, it's getting something in we call focus mode. This we need to remove so we don't get confused. So I'll go to the menu and I will select all these, I will look for something that is called focus. Let's see here or there. Is focusable, I need to turn it off for all the buttons. Here, there is nothing. Great. Now we turned it off. We removed focus on the widget. We want to make sure last thing that everything is okay. I think there's something wrong that I did not connect the player and is the widget to focus, Compile, save play. The widget is here. We do edit. We get the mouse, I can select, I can do anything. So that's guys for the Widget user interface in real engine. The next lure, we will talk about the animating our widget and how the widget is animated. 11. Menu Animation: Hello, everyone. Welcome to a new lecture. In this lecture, guys, we will talk about menu animation, and we will learn how to animate our widget. So we'll double click on the widget that we've got, and there's something we need to add before we do the animation is that we need to put a canvas for these lower living room sitting room and all. So I'll go to the palette and I'll take Canvas panel, and I'll bring it here. And I want to make it the same size as our templates, all the icons, and I want to make it with a correct height, and I want to drag it till the end, including the tap to height. Okay. And now I'm going to take the icons that I did is the living room and sitting in the kitchen and the mita hall. So these are the buttons, all of these, and I will drag and drop them into our canvas panel. And this canvas panel, we want to call F two. Menu bar. And these, make sure, guys that we don't take the entire menu bar, and we bring it to the right to the left like this. This is wrong. This shows that it's okay, but it's wrong. Control Z, what we do is we take the buttons themselves, and including the tab hide, we take the tab hide with them, and we shift them to the left. This is the correct way, guys. We don't move the menu bar canvas, we move the buttons themselves, and we fix them according to the height of the reference above them. Great. So this way, everything is correct, and we fix the menu bar correctly. You see all of them now are grouped together with the correct alignment. Now compile, save Okay. So now I want to make a simple animation so we can take an idea where do we do animation. So we open render transform from transform, we see translation, scale, shear, angle. And I've got pivots. So for example, if I do the scale 0.5, then it has become smaller. Zero is hidden, one is fully visible. I can control the scale in terms of x and y. So I can be specific in the y, or I can be specific in the X. And I can to a certain point flip everything. I need to be realistic and reasonable, what I'm doing. I'll click on the Canvas menu bar from here. And I want to do animation, so I'll go to Window, and I will call the animation bar and animation I like always to be in the bottom like this. And I will add animation from here, and I will call it menu animation. Okay, sorry. Let's remove Capslo. Good. Menu animation. Now, we want to click on it and we want to do track and we'll track to the menu bar, and we'll add track to what? It's going to ask me. I will ask for the transform. And from the transform, I will go to scale and x and y. And from here, I'm going to do key on the zero on the scale. And then after that, I want to bring it forward. So here, wait. Here the pivot is important to be a second. Let's put it 1.5 seconds, and here the scale. Let's make it Let's see. Here is one. Let's make it zero here. And bring it to one here, 100%. But here, when the timeline is here, I want to fix the pivot to be zero. Let's start now. Perfect. Perfect. Very nice guys. Sweet and smooth. So we'll minimize the time guys, so it's almost instant. So we'll put it to 0.5 seconds. We'll do play. Okay. So now we need to adjust the key points to be final with the time. So we'll take this timeline, we put it small. The value is basically that's the reason because the value has stopped here by this time to zero. Now I need to put it to one and make key, and now it works correctly. For example. Okay, great. So this way, guys, we make compile and save, and this is how we make animation as simple as possible. We can fix it with the translation with the scale, if I want it to move, shear, if I want it to get skewed a little bit or stretched. I've got an angle, if I want it to be rotated, and the pivot, I can fix, where does it start from? Okay, so here we want these to be animated upwards. So here the animation is from left to right, and we want the subtabs to go from down to up y so we need to make a certain animation for it. Here I want to minimize the time even more. So we'll put it only to 1 second, and we'll put the time here in 1 second, and we will make it one by 1 second. And now we'll do play, and I think this is much better. O second is great. Now, I want to do the same concept. I'll take the Canvas, our Canvas that is called living, and I will go and do a new animation. And from the living animation, I'm going to do track living. I want the Canvas panel slot, the entire Canvas, and I want to do track from here, and I will do layout alignment. We did it wrong. We'll do living, here, track transform, and when I come to scale, I'll do track here or key, and let's do 1 second. Let's make this big. 1 second exactly till here. By 1 second, let's make this scale here. Here in the beginning, it needs to be zero. Scale for the y now zero. And here scale so be one. From the pivot, we'll go here and we'll do zero play. Here it's going to be one play. No, as well, needs to be corrected. Here needs to be one. Exactly. This way, the animation is correct, 100%. Compile hidden and then it appears from bottom to top. Okay, great. Now I want to duplicate this function to the rest. How do I duplicate? I'll do duplicate, from here next sitting groom animation. Sitting animation. And from the sitting, I want to from the track, do right click, and I will replace with living. No. Because I clicked on living. Now sitting, replace with sitting, and now we do play, but we need to fix the pivot here to one. Awesome. Rather than repeating the entire thing, we just can duplicate, click, duplicate. Let's say here animation. The next one is kitchen animation. We'll do kitchen. F here, we'll replace with kitchen, right click, replace with kitchen. It's replaced with kitchen. Here, I'll do one, play, perfect. The last one is the Mitale, right click duplicate, and we'll call it Meta animation. I'll click on it and I'll go to here no Mita still. We did not replace it. So I'll replace it with Mita Hale here. It's replaced now, and I'll go to the pivot and make it one. So this way, all of them they work best. Okay. Great, 100%. So now all of them are working correctly, the animations. Okay, so how do I show my work now, and that is visible in the viewport and I can see it. And when I play, I can see it and all is okay, and everything is correct. You see here we've got a problem, guys that we need to fix. So let's debug before we continue further. So this is how we fix this? Compile play. This is correct. Now we need to fix the shift. It needs to be all moving to the right. Sorry, now we go to Unreal and Why? Because the anchor is on the top left, we fix the anchor to the bottom and now we play and vola the problem is fixed. 100%. Now we click tab, we get the mouse cursor, and we can click on whatever. Okay, great. Now I want to do interactivity to this so it can be appearing in the menu and I can control it. So what I want to do is from graph, event construct. Also, it has variables here and all the variables that I need. You see, guys when we arrange everything, how everything appears and I can control anything. I'll go to Designer from here, and I will take all of these, including the main and I will do is variable as well, so I want to have them as variables. So now they are all available here as variables. And I want to just make sure what names does it start with Main living. So the living, I'll get living, get main and menu bar, get kitchen, get metalelso get. I think we still have the sitting to get. Sitting, get L et's arrange them, living. Then kitchen, then metal whole. Let's take all of these. From event construct, sorry from here, I will do set, render opacity. No, not this one. Set render opacity. E. And I'll connect it to event construct, and I'll connect this with that, and I will connect all of these to the set render opacity, and the opacity I wanted zero. So it's a basic thing, guys. I put it to zero based on the opacity that is here. So if I select the living here, I see that there is a render opacity option. So I called this node, and I said that when the constru when I call the widget, set the render opacity to zero. So hide all these menu. Let's do play. So now all menus are hidden. Okay, I can as well go to play. Main, I don't need it, or I don't delete it. I just disconnect it. Compile save, play. Now we've got the tab to edit exactly. This way it's going to show. When I click tab, I'm going to start the animation of the widget. So we want to configure this now on my blueprint. Great. Now I want to do the animation that we desire and that we worked on. We want to go to main menu widget blueprint. Remember, that's the class blueprint that we've done, and I want to do interactivity on it. What I will do now is I will take from here and I will require menu Canvas menu. Okay. L et's call the animation menu. Get menu animation. This is what we're looking for. Menu animation, this is what we need. This is what I've done in the menu. That's the menu animation. So I want the first animation is the menu. So what I will do now is I will do play animation. Forward. And here, play animation reverse. So when I do tab, it's going to play the animation. When I do tab, it plays reverse. There is an error. I need to connect these to the targets of the Widget, compile, save, now we do play. We get the tab to edit, we do tab, nothing happens. We need to debug and reconfigure. Because we need to put the menu canvas that is ours. We need to do the opacity to one. So I'll take from here a node and I will do menu bar, get menu bar, from the menu bar, I need to set, render opacity, exactly. Let's do the opacity one and play animation forward. When we play animation backward, control control V, but let's do the opacity zero, when we do tab again, connected here and connected to the menu bar. This should be okay for now. Let's do play. Tab F 11 tab. There we go. We get the animation tab. It hides the animation. And we can interact with the buttons furthermore now. Tab shows and the mouse gets out, and when we do tab, it hides and the mouse is hidden. P. This way, the menu is starting to come to life. So now we go to our menu blueprint. So we want to guys make a fast forward video just to fix these and give you a perspective on how to fix it because it's not very well organized. Now it is much cleaner than before. Of course, I can spend more time making this even more arranged. Of course, the main node that we added to fix our nodes is the reroute node where we can connect to it and connect to different nodes. Compile, save. This way, everything is okay and I can read the code in a straight line that is accurate and organized. So now we want to continue. We'll do the same for these actors that are here. So when we click here, we want this to go up. So I'll do the same procedure. I'll go to Live here. Exactly, that's the menu bar. And from the living room, I'll go to graph. Here, there we go. But Live. We do get. No, compile. Designer. I don't need this one itself. Since it's a button, guys, when I click on it, I should get details that are here exactly. And now I can do on click. An event happens. On click here, I'll do flip flop because when I click, I get something, when I click, I want to get the reverse part. Okay. Now I'm going to do set render, sorry. Before I do set, render opacity, I want to go from designer from here, and I want to take the menu bar, the Canvas panel, and I'll drag and drop here, get menu bar, and I'll do set render opacity. Not this guys, when we click this. When we click the button, we need to control the living, the previous one. Get living and this we do set render opacity ex. Now we connect this to flip. Okay, good. Then from here, let's take the animation that is here. Living animation. Guys, It's okay that we have a lot of things everywhere, but after some time, we will get used to it, so don't worry about it. We want to make sure that this is 11920 by 1080. This is number one, compile. T size correctly now and everything together because they are fit into Canvas panels. I want to make sure from here that I'm selecting the correct parameters. Here kitchen, let's examine nothing in the shear. Here, the hole, nothing in the shear. Okay, so everything is straight and nothing is sheared. Okay, good. So I need now to get the animation of the living to get started. So I'll take the living. Living, animation, get living animation. And here I want to do play animation forward. And here play animation reverse. And this I want to connect here. Compile. Now I want to get this here. Here the opacity needs to be one guys, Control V, and then we get this behind. We do this the target. We can get a rear route node. Mm. This way, the code is organized and everything is okay, save play. F 11, tab. We get the animation. We click here, we get the animation further. We click here, it hides it. Okay. So if I did tab, we still get this here. So I want to go here. I want to do a simple edit, not in that code, in this code. We want to go to the menu, and here we said the menu bar needs to hide. So I'll take another line from here, and I want to call menu bar, which one did we call the menu bar? Designer. The second one here. It's called living. We'll go to the graph from here in the class blueprint and we'll drag from here living, get living. And now connect here and connect here. Compile save Play. Tab, we get it. Tab click and. Perfect tights. Okay, I think, guys, we got ourselves functional code. So from the menu, I just want to see if I want to do any further modification. Let's see. I want to connect this one, and just connect the living with the one in the bottom. P. Now it shows and hides. And when we open it again, Let's try to do the reverse. Connect this one to set render opacity one, compile, play. No, this one is wrong. This needs to be here, and we want to come here before this. We want to do delay, and we'll make a delay of 0.1. Okay, let's see the Z order one. For example, let's disconnect this one because this one already is connected with our menu Widgit Compile play. Now, we've got a small problem in the animation itself. I think that is the problem relying in this code, c end pacity. Let's put here the ender pacity zero. I guess this way the problem is completely solved, living tab. When we close with the tab, it gets closed, so we need to double click then so it works. Let's see if we make the delay 0.05. Or let's try from the HD direct without the delay. Let's skip the delay for now, save play. Living room. Tu living room. Okay, it's okay like this. So our menu is completely functional, and our animation is completely functional. Okay, guys, so the main purpose of this class is to show us how to enable the animations in our menu, either they were horizontal animations or vertical, or either they were main animations, parent animations, or sub animations that are dependent on another ones. So now we want to go to the widget, and we want to do the sitting, the kitchen, the menu bar, We'll take the sitting here. It's here. From the sitting, I'll go to menu. Sorry. Okay. Let's wait. Designer. Okay, so we need to get from living room from the sitting room, the second one. And from the sitting room, we want to pick compile clicked. And then I want to go back to the designer. Again, in the kitchen. I want to hover here and click on click as well. Compile and I've got the metal. And now we're copying the codes and replacing them with the variables. Now this is the first one, we copied the second one. We just replace the variables, the kitchen in the bottom and the animation that we need. This way, our menu is completely and functional. I hope you guys benefit from this one. See you guys in the 12. Material Changer: Hello, everyone. Welcome to our new lecture. In this lecture, we will talk about the variant manager and how we are going to be able to change our materials into the Wigit blueprint. And this variable manager we will use for us to change materials the easiest way in real engines. So I'll go to plug ins, and I'm going to make sure that the variant is available here. So I'll type in manager. Variant Manager is enabled, and all is good. Now we can call the tab that is responsible for variant manager. So now we'll go to Blueprints, and we'll do right click from here. We'll go to Miscellaneous, and we're going to add level variant sets. And we're going to call this Other than new level, my variant set. Exactly. Double click on it. I get an interface in this way. Something that is very nice and very easy, guys. So here I can add a new set, and this new set, I can rename. And I can call it living floor. Or let's type it in as F two. Level or not. I want to name it something strategic. So let's call it living with caps, floor Matt. So this way, we'll understand it's living, floor, material changer. And we'll add from here a variant and we'll call it variant one. Or we can call it the name of the material that we want to change the floor. It's also possible. And from variant one, I'll click on the floor. Okay, I can't find it like the cinematic, so I will just type in floors, underscore S, underscore floors 05. Or I can type in floors 05. It's okay. So now I've got the static mesh. And when I click on the static mesh, Ariel asks me, which properties do you want to change? So I ask for, let's go to the details and ask for material. We want to change the material, so we'll go type in material zero, select. And here it asks me, which material do you want to change? Why do you want to change it for? I go to my materials, Mega scans, surfaces, it's easier for us to just hover from here and just scroll down and see if there's anything that is potential. Okay, we seem not to have any materials that is compatible here. So let's go to our materials. FHR materials, then we'll go to our materials. Let's check what we have here. And make a check here and see how it looks and see if it suits. Also, we want to keep under consideration. What do we need to change for? We don't want to be so far away. I want to take this as a reference and I want to see which material I want to change. First model, we want to like M. It's like Baje Mar. We'll go here and we'll go for Quicksil Bridge. Marble. And I'm going to search now. And I will look for the surfaces. Let's come and look for closest thing possible for what I've done. This travertine marble is nice. Let's see if there's something with tiles. That's the material here. Let's assign it. Perfect. Control Z. So we'll assign this material into the variant manager now. We'll take the variant manager, we'll assign this material, and when I check here, I get the material that we just assigned. Then I'm going to add another variant and I'll do F two, and I'll call it variant two. Same thing, I will add or, I delete, and I duplicate this one. So it's the same. It took the same floor, and it took the same properties as we want the static mese to change. But now we need to look for the third material. So from the reference, the third material looks like a grayish concreteh material. So we need to look for something like this. We also will look for the material in mega scans, and we will look for either marble stone or concrete. I like these things, these raw materials that are true to materials. Let's keep this one in mind, damaged concrete wall, but let's see if we find anything more convenient. I think I will go with this one, download. The second one is going to be damaged concrete. It looks nice, but I think we need to modify the materials a little bit further more. Actually, it looks very nice. So now we want to try to rotate it. Real has crashed. And also the variant manager is gone. Let's see if the materials do we still have the materials or not, but let's add a new variant set for now, and we'll call it M variant set. Db click on it variant F two living floor material. Add a new variant. Now, I'm going to take the floor. Add from here, so I'll do floor 05, there we go. That's the floor, and from here we will add that we want materials. Element zero, select. This is the material. Do we still got the materials that we downloaded. So let's go and look for surfaces. So they're gone. We need to reimport them again. That's another one Oceanic Marble. So we'll go to Mega scans again, Quick sill Bridge. And we'll type in marble. Okay, guys, so now we want to enable all of this into the widget. So we assign the materials as we have seen in the previous example, and we'll go to the widget now. And we'll go to the graph. I. And I'll take this button, living floor M one, graph from graph, I'll call it from here. Get living room floor. No, I did not take the correct event. We'll go and look for the correct event. It's from here on click. I have to click on the variant. Living floor M one and we need to click on click. When we click it, before this, we need to get all actors of class. And the class that we're looking for is my variant. Create level variant actor. No. Create level variant set actor, as well. That's the one variant set. That's in the scene. Now, remember, guys, we need to drag and drop the variant into the scene. We can't assign it from here. Let's look for level variant level variant sets actor, exactly. This is the one. And we want to look for get all rebounds no. Get a copy exactly. F here, I'm going to choose promote to variable, and this variable, we're going to call my variant reference Inter compile and we'll connect it here. Compile great. We don't have an error and everything is okay. Another very important thing, guys, as we said, that my variant set needs to be in our scene. Otherwise it won't work. If it's not in the scene, we deleted, drag and drop into the scene, so we make sure that everything works. Otherwise, we're going to have problems. Before we do anything, we'll get the variant reference we did. If I don't do this, the code won't work up there, so This way, I can now switch on variant by name, and I want to connect this to that, and then I will type in the exact name of my variant. So I will type in here. The variant set name is living floor materials. So I took the exact name. I typed in F two contra control V, From here in the variant name, I do Control C, and Control V. Compile, save. Let's try play. We get the Widget tab, living, we click, and we got the first material changed. Now we need to do some modification is that this material should be the second variant. But we're going to go to the blueprint that we've done first, Widget blueprint from the graph. It's all fixed. So for the Widget guys first one, we did concrete, as we said, we need to so in the original one, the first one is marble. So here when we do tab, play again, tab living room, we got the gray, the first one. It's not the first one. It's like the third one. So we need to fix another one. So basically what we need to do now is just to make a little bit of switches. So when I look for this one now, search. That's oceanic, and we need to go to the second one, so we'll assign the damage to the ocean and we'll take the oceanic and we'll assign it in variant two. So it matches the icons of our widget. And here I will choose damaged concrete. Exactly. So this way it's correct. Minimize. Let's do play. So this is supposed to be automatic now living room. We pick the first one. Exactly, it worked perfectly 100%. Now we need to work furthermore in our widget blueprint. So we just want to copy this to the other buttons. We'll go to the designer. We will take the second button. We'll go from here, I'll do on click, and we'll do copy to these from here, Control V. I'm going to connect this with the target. And I'm going to call this from variant one to variant two. Compile. And then I want to take a third button, and I want to do clicked compile. Okay, so this way, guys, we're going to do fast forward to the video. So we do the rest of the icons of the materials Of the sofa. And now everything works perfectly fine. I've got a fully customized space with materials that I can change for the sofa and for the floor. Here, guys comes the beauty of interactivity and the control of our scene. We can do whatever we want with no limits at all. We can add as many icons as we want. Now we know how to do a widget and how to do animation for it, and how to also fix our icons in the scene. I hope you guys benefit from this lecture, see you guys in the next one. 13. Lights And Music Onoff: Hello, everyone. Welcome to a new lecture. In this lecture, we will talk about how to turn on and off the lights and how to turn on and off the sound as well. Same things that we did before, guys. We will do a new variant set, and we will call different things for now. But it's all we can do in the variant manager. Before we do anything in the variant manager, we'll put some lights, so we turn them on and off. I will put a rectangular light and I will take it and put it somewhere near the fireplace. I want to control the source width and the source height, and I'm going to rotate the light 90 degrees. And we're going to fix the parameters of the light. As you guys can see. For now, we've got two lights that we can control, and these lights, of course, guys are applicable for anywhere we want to apply lights. So we're just doing an example. So we've got the barn door here that we can control, we can make it smaller or bigger and the barn door length, we can increase or decrease the fall off distance of the light you see now, it looks. Same for here. I can just make the light less intense, and it looks more realistic now. Of course, I can increase it more than that and decrease the bump that is in the material to make balance. But for now, I'm happy for the results that I've got. I'll go to variant manager now and I'll do a new variant set, and I'm going to call this lights or living lights because I've put lights in different places, living lights, and I'll do add from here and I'll do F two light on Now, we pick the actors that we want to put here, and I drag and drop from here, and I call from here intensity, and we do octangle light component intensity, select. Now when I click here, intensity is 0.5, it's on. So when it's on, I want it to be 0.5. I'll do duplicate from here, and I'll do F two, I'll call it off. And from here, I'll do light zero and from here, light zero. So when I turn this variant, it turns off the light. When I turn on this variant, it turns on the light. So I'll do save all now, save And I'll go to my blueprint Widgit menu. And from the menu, I'll click on the button of the light. And I will click on click. And from here, I will get also the turnoff lights, and I will do on click as well compile. I'll take my variant reference, sorry, click Control C. I'll take these. Sorry. And I'll connect it to light on. From here, I'll do F two control C as we agreed upon, variant set name, change it with a variant set name, and here I want to take F two control C, control V here for lights on or off. Lights on. First one, switch switch variant on by name. Same for here, connect the target, and here we type in off. I know for sure, it's called lights off, so I will call it lights off, and I'll do compile, save, close, play. So now the lights are on. I click on the Widget tab, click on the living room. Lights of lights on. Okay. It works perfectly. Music will fix it now. Okay, so if we want the light to begin with unsib. Like, I want it to be off in the beginning, and then I want to turn it on. So what I will do now, I'll go from light itself from here. I'll scroll down. I've got something called visible. Exactly. And I'll do here, unvisible, as well. And I'll do play, and I'll do tab, living room, turn on turn off light. It's now working. Why? Because we have configured a different variable guys. So I'll go to the variant set now. I can control the light to turn it on or off through two different ways, either visibility or intensity. So I've done intensity, and it worked perfect. But what I want to do is, I will delete this component or undo, sorry. I will take these two rather than do, okay. Okay. 5,000. Let's add properties. No. Okay, let's delete both of them, and let's do a new variant set or a new variant and we'll call it light on I'll take these two and I'll drag a drop. And from here, I will call visibility exactly rectangular light component visible. So in the beginning, it's true on on because I already decided beforehand that I want the light to be unvisible from the details. So on on, I want the light to be visible. F here, I'll do duplicate, and I will rename this of and O because there are more than one light. So let's do lights on and lights off. And here, I'll take both two and unchecked to become unvisib. Save all save. Now I play tab living room. They're not working. Nothing is working. Why? Because I need to go to the blueprint and I need to update the changes that I've done. So I need to add S here, and here as well. Compile save. Let's make sure from the lights that they are visible, exactly they're visible, save. Now we do play. T lights on turned off. But the level started, and the light was off already. So this is a way I can start with the level turned off. Now we know how to start like this, and we know how to start if the level is turned off. So now there's another way I can do if I want to turn them off in the beginning. So I can drag drop the lights to the level blueprint. So I can do set visibility from here. So the first thing game starts, visibility, new visibility is checked, show the light, and vice versa. The other light we can connect here and do that it turns on when the level begins. So this is what I told real that when I open the game, do another visibility than the visibility that is different. When it opened the game, visibility is different because I forced it by blueprint. I go turn it on and off, but the game started while the lights are on. We forced them by blueprint. I turned them off from here, play the game turned on with the lights off. I've got full customization for whatever I want to do. This is the concept of the light and it's applicable for any light I want to use anywhere in unreal engine. In any scene we want or in interior. We will be covering all the icons of the different interactivity. For now, I will do the music. And I'll do on click music off. I'll take my variant reference, Control C, Control V. Same for here. And we want to do a variant and we want to change the name from here. We want to go to the variant manager that I have. I closed it, so Blueprint variant set, and I'll take the sound that we've got, Drag drop. Bring it here, bring it to the actor. Sorry, we'll do a new variant set and from here, I'll call it music. I'll do a new variant. And from here, if to music of because it's already on in the scene, so I just want to turn it off. If I want to turn it on again, I do two things like two variants on and off, and we do it the same way we know how. So I'll drag drop the actor of the piano interior. And what I want to call here is enable. No. It's volume volume multiplier. Select. Volume multiplier, let's make it zero when the music is off. Double click here. Let's make sure that we have set everything correctly. So I'll do compile living music off, I'll call it here. Music. We can call it music or livings music, whatever you guys see convenient. And here we will do music of safe play. Let's turn on the audio from the viewport. It's playing now. Now the sound should be higher. Exactly, so it's working perfectly, guys. The sound is on. Tab living room. We click this. Nothing happens. There must be something wrong we did. So we'll go to the Widget menu. We'll make sure that this is the icon that we configured. Interference. You see it's lights of guys. We need to call it of and I do it the same way correctly in the music off. So we'll go to variant set. Music, small letter and off is all capital. Music, small letter and all capital. Okay good. Save play. Sound is playing tab living room. Sound is off completely. I go back, escape, play music on. If I want to make another turn on music, simple as we make another icon in the widget, like here, in the designer, we already have it, and from the variant manager we'll go from blueprints and we'll go to variant set. We'll do another variant, we'll do music on. From here, the audio component volume multiplier should be one or 0.5. It will work again. This for the lights and audio guys, I hope you guys benefit from this lecture, see you guys in the next one. 14. Tv And Media: Hello, everyone. Welcome to a new lecture. Today, we will learn how to do the TV and the media, how to turn them on and off through our blueprint that we've got here with the material blueprint and all of that. Okay, guys, remember, we did this TV, so the first thing we do will play, the TV works, and all is good. So here let's work the Pivot first. So we'll do modeling, and from modeling, we'll go to pivot and from Pivot We will do bottom and we'll do accept. I want to drag and take a copy from it. And this is the old copy, and this is the one we're going to work on. So for now, we're going to do double click on the TV, and we'll take this material, basic material, and we'll assign it to this TV because I want it to start as turned off TV, and I'll go to the blueprints that I've got. And also, I'll go to my variant set. This is an awesome tool, guys, the variant manager. You can do a lot with it. And I'll do another variant, and I'll do TV here. Add variant here F two TV on. So what is the static mesh that we will choose is the walls, TV, and we want to change the material here. And the material I want to change is the element one. So static mish component material one, not 01. So I added the parameter of the material. So this is when it's on, I want the video to be turned on. So I'll look for this material search. I'll put this video material, and then I'll do duplicate from here, I'll do F two, and then I'll do off from here, or let's do capital off. Okay, TV off. Let's keep it as this. So now the TV on is on and TV off, we want the MI plastic stanless steel. So we want to or Satin, so we want to replace it with this. Now we do. We do tab living. No, it's not in the living, it's in the metal. Turn on doesn't turn on, turn off, doesn't turn on or off. Nothing happened because we did not do any commands in the Widgit blueprint of the icons. So I'll go to the icons. From here, I'll do unclicked. And then I'll go to designer, and from here, I'll go nclick as well. Compile. This is my variant reference, Control C, Control V, I need it, so I can control them, and I'll do control C control V from here, and I will connect the nodes and make the variant reference. Let's call it TV capital TV, and here TV on CPs exactly. Good, compile. Same thing, Control C, Control V, and here I say TV of Okay. Great. Compile. We need to connect to the reference. The variable save play tab. Now the other one played directly. This one started. Now we click this stop play. Stop. Nice. Okay, Let's make sure of the sound. And the media sound, TV media is there. There is audio. But this audio is away, and this sound is also away. Which one is for which. So this is the TV media. Okay. We need to click on the Media sound and bring it to the Mta Hall. Okay Let's keep this one. This one is for the main one. Sorry, this one is for the old one. We want to play the new one here. So this one already worked, and the sound is already playing. Mile play. Now it's playing when I turn it off. We put the sound of the other. Let's try to put this in of our TV. This is TV two. Let's do play. So there is no sound. We brought the sound of the correct TV. Now this is the other TV. Let's keep it. The sound of it is away. This is our TV, Control Z. Let's bring it back to where we brought it. You see because we moved it all from the TV, it all moved if we want to just move the media which we move the media from the panel. Play. Let's delete this for now, or put it somewhere away. We can test which TV is working correctly because the sound is on. Play. Okay. No sound. Or is there still a sound? So the sound is playing directly without us, playing the video. So let's do more advancement to the blueprint and see if we can do any solutions for this. So I want to go to the menu, I'll go to graph, and from here, guys, I want to command to turn on the TV. So it's only associated with click on and clicked off. So I'll do a new variable from here and from this variable, I want to say my media. My media reef compile. And from here, I want to change it to media player media objects. Play. Object reference exactly. This is how I want it. Media player. I do compile now. So Andrel asks me, which media do you want? I'll call TV then I'll bring my media reference Drag drop get. Here, I'll say open source. Connect. And here I'll choose the movie location that we configured, Compile Save. Minimize play So the sound is not turning off when the media is off. Okay. So this is our sound space. I am going to delete this one because we're going to work on this one, and it's just going to confuse us. So the sound still works. So the sound is still working regardless of all of this. We could also do more debugging and double checking. So I'll go back again to my code from here. I want to try to do something that is the first when I play, I get a flicker of the video does not play directly. So I want to disconnect these nodes, and I'll bring them here and I'll bring the open source in the beginning. I'll call delay node, and I'll connect it with 0.2 delay seconds. And here, I can also say, so it stops when I close. I'm going to say stop. Stop from here. No. Media reference, my media reference, variant reference. No stop then, close exactly. Connect it, all good, save, compile, save. Let's try now. Sound still playing. So the sound now played in sync, and it stopped even when we did stop, play. Stop. Play. It's working perfectly, but the first time, first time is still working. It plays the video. So this is the thing that I need to fix that. Whenever I do play, it does not play the media. Only when I play it, it plays it. So let's debug furthermore. Let's go to my variant manager, and let's do my variant set TV on TV off. That's correct. Okay. So remember, guys, when we did the TV in the beginning, we did it in the open level blueprint to make it work. So now I need to turn it off from here so it works perfectly. This was the problem because I was forcing unreal to play from the level blueprint. So now we do play. The sound is completely gone. Everything is perfect. Now we do tab, we go to Mah, turn on. I turned on with the sound perfect. And now we turn it off. The sound turns off as well. 100%. This way, guys, the media is perfect. I hope you guys benefit from this lecture, see you guys in the next ones. If you guys have any questions, don't hesitate to write us. It's only the steps. If we apply it, all would work perfectly. 15. Water Animation: Okay. So we will talk about one of the last topics in the Blueprints, a huge chapter filled with information. And this topic is the water animation. Today, we will learn how to turn on the animation of the water and turn it off. So first thing, I want to hide the water sink, and I'm going to click on the geometric cache. And, I can't do it from here. I'll go from here, and I'll do convert selection to blueprint class, and I'll pick harvest component, geometric cache. And I'm going to call it water BP. Or BP underscore water. Select. Perfect. So now it's here, it's opened here, geometry cache. I'm going to call it water from here, Compile, save, and this is all what I need to do here. I need to close it and go to the widget, our widget. From the wig from the graph, I'll do the same thing that I did here, that I will do the same thing. I'm going to take a copy of these two control C Control V, that is get all actors of class, I'm going to connect it here, and I want to request the class of BP water. Here I will do promote variable, and I will call this variable F two BP or water R, and connect it here. Okay. Perfect. And now I'm going to, we got an error. We've got a problem. Okay, so there's an error with the node. I'll delete it. I'll take again from here and I'll do get. No, not that. What was this? Was get a copy, guys, so we'll change the reference here, and we'll do it again, promote the variable. So that get copy was promoted to a different variable, so it did not work here. So now we need to do from out actors, we need to get a copy, and now we do Mwaarian, should be fine for now. Exactly. So as we said, the copy, when we do get copy, be a unique array for its own. We need to get it from scratch, not a copy, as we said. It does not take the parameters of other stuff. We'll go to the designer now and we'll go to the water and we will go to the details and we will look for unclicked exactly. F here, I'll do the same. I will I want to get the variable that I got, the water variable, water, get my water variable. And from here we'll do play water. But what's better than play water is play from start because it's an animation that has a certain loop. So it plays from the beginning of the animation. Compile. So when I click on it, starts the animation of the water, save play. So water is playing. It's already playing y because it's running and looping. So I'll remove these both from here, still running and looping. So I'll go turn off the water from here. It's turning off, but there's something seeming that it's letting the code always play no matter what we are commanding it. So what I will do is I will go to the blueprint of the water that we did from scratch. I'll go to the water, and from here, I want to turn off running and looping. Compile, save, and now we do. It's not going to run. It's not going to loop. I go to kitchen, play the water, water goes out, all perfect. I click in water. Again, it's not turning off. So til the animation stops, till it turns off. So guys, we realized that the water worked and all is good, but I want to be able to click on the same button and be able to turn off the water. It's just playing the animation from the beginning. So what's the solution of this guys is that we go to the menu that we've got from here, and from the water from here, we do set actor hidden in game. And from here we do flip flop. Why? Because the same button will do two commands. So the first command, it will do set actor hidden in game. And then I'll connect play from start. The other thing is set actor hidden or from here, set actor hidden in game. We'll do it with a flop with a B. Here, I'll do so it's off in the beginning. So when it turns on, I wanted to turn on and then and I wanted to turn off the visibility that it didn't work. Play kitchen, play water. It plays off on again. It worked, but first time it did not really work efficient. Play. So it's lagging the first click. So first click needs to work. So for this, what I want to debug now. I'll go and just flip these two, compile, save play. No working. Okay? Good. Working off nice. So it's working perfectly now. So this way, guys, we turn on the water that we've got through blueprint. Of course, this is not the last lecture. There's another one after this that will change the models. I hope you guys benefit from this lecture. See you guys in the next one. 16. Object Changer: Okay guys. Let's come to the last concept of changing models in our blueprint chapter. We'll take this model and we will give it this material. Same material for now. We are just explaining the example of the interactivity and the blueprint. We'll search for this material and we want to apply it here. No, no, no, this is leather. Okay, great. And this leather, I will do a duplicate and I will select it, and I will fix the tiling of it. So I'll do one by one. I think this is okay. I will try to move the offsite a little bit to the right or to the left or 0.50 0.5. That's a lot. One by one is okay. Okay, this is good. Okay, great. And material parameters are the same. We know it all of mega scans. Now what I want to do is, I want to put this object and that object here in this location. So I'll take a copy of this object. I need to fix the pivot again. Ult, and we will take a copy with shift. I will put it up. And of course, you can relate to this object or to this example, any objects you guys want to change in the future. You guys can change multiple objects, or you can change like di types of objects. There's a lot of objects we can change. Either you can change like a building facade or you can change whatever you guys want or like a chair or anything. We'll go to variant manager now. I'm going to add variant set I will call it Ma change. I'll add a variant. Variant one will take these two objects and I'll drag a drop them here, and I will turn on visibility select. From here, I want to duplicate and from here, this is F two variant one, F two, variant two. Here, I can do this visible, here, unvisible. From here, I'll do the reverse visible and visible 58 81. So 58 is visible the first time, second time is off, 81 unvisible, and second one is visible. Okay. Perfect. So now I do save all. Now we've got the problem of multiple level saving. We'll do main save, yes. We've got an error fail to save, so we'll do main 01 save. I got saved on a different level. Okay good. What I want to do now is on the main. I'll do save all, save. You see, now, I need to do like level zero to not save many saves. I'll go here, to save all, save save on top of 01. It's saved, but I'm still on main. But on the level itself, it's not saving. It's okay. At least the data that we've got is saved on 01. When I close the file and open it, it will be there on the main. So I fix everything on the variant. I will go to the widget now and I'm going to configure this. I'll go to graph. Before graph, go to designer, give me the change. Because it's the same icon, I will pick flip flop of the two objects, and here I will do flip flop. Here. Then I want to get we need to get these two actors from the variant. I'm just doing the calculation. We need to take switch variant by name, control C control, we'll connect it here, and the target should be not my water, not my media. M variant reference. We can take my variant reference and see if it doesn't work, then we do another new reference, but most probably it will work. So we'll take my variant reference and from here, let's look for the variant that we want. There you go. Meta change, F two control C, and we will assign it here, Control V. And here I want to F two contro control V. Great. Now the second one control C control, I'll connect it to the flop to the B and my variant tramp, and here I will call it variant two comple let's play. So we've got both of them for now. Apparently, one must be unsible. But let's see, we change. The code is perfectly working. Now what we need to do is to take the first one and from visibility of it, we need to turn it off. Play switch, switch, switch, it's working perfectly. And this way, it works perfectly. One last thing, if I've got more than one object, what do I do? Flip flop tics only two objects. We use a node that is called multi gate. We connect this to that, and then we do multiple outputs, as many outputs as we want. We do them loop or no looping, or is random, or I want them in a certain sequence. The multi gate, we connect it here and we connect the rest of the variants. We connect them here according to as many icons as we've got. This way, we finished the chapter of Blueprint guys, we learned so many things. I hope you guys benefit from this lecture, see you guys in the next chapters. 17. 104 Packiging: Hello, everyone. Welcome to a new lecture. This is one of the final lectures of the course, guys. In this lecture, we will talk about how to package our project and be able to send it to the client so they can walk through it and change everything as we were doing from the beginning of the course. So before we package, we need to go to project settings. From project settings, here, there are things that I can control, for example, like project name. I can do Farmhouse, for example. I can change the thumbnail, I can do the project version, I can do the company name. I can do company distinguished name, TV, for example, Homepage, if I've got a website, certain website, I put it here. Support if there's a number that people could contact me on. It's all these we can add to the project. I want to go to the maps and modes and from editor startup map, and we've got a game default map. So game default map when the game starts, and editor start up map is what I've got now. So Maine should be in the Game default map. There are other things we need to download guys for us to be able to package our project. So I want to try to package my project without downloading anything and see what I get. So we've got all the platforms that we need, if I need to package, I need to go to platforms, and so let's check if there is anything missing. We want to double check before we package. All is good. We'll go to platforms. We will go to windows and we will do package project. It will ask for SDK for windows not installed properly, which needs to be generated for data. Check the SDK section for the launch on menu Main Toolbar date, SDK. Would you like to attempt to continue? Yes. It's going to ask me where I'm going to save, so I will new folder. I will do a new folder here, call it game. And I'm going to save my data inside the game. A package failed because first thing is that we need to download multiple things. So the errors here are because we did not download the things that we need to download for unreal. Other than that, it would be able to package and everything should be fine. Okay. So if I want to get the output log again, I do the bottom that is exactly under the escape, that looks like a sign, or it looks like an upper coma. And when I press it the same, the log is hidden. It's the bottom between the escape and the one. So I'll go to Google, take a tab, and I'll do windows SDK. And I'm going to access this one. Download the installer, getting started download the installer from here. Of course, this lecture, guys, we're going to be needing to do it only once, and then after that, every time I will package in the future, it will be able to package without me downloading anything further. So estimated disk required 3.7 gigabytes, it's going to need storage, you guys need to empty some storage for it. Except Let's double check disk space available 3.7 install. Yes. It has installed. I'm going to close it. Next step, guys is that we will go to Google again, and we want to look for net three. I think this is the one. This release has reached end of life, meaning it's no longer supported. Let's try to download it anyways, since it's 3.1, we wanted 64 bits, and let's verify if it's expired or not. Let's go back here and check the 3.1. The other resource. Releases 3.1 Visual Studio 64 platform, December 3 19 download downloads. This is an expired version, the one that we just downloaded. This is what we downloaded and this is no longer supported. What we will do again is the double check that we took the first link, and this one is no longer supported. So we will do show in folder, and I'm going to delete it. I'll scroll down and see what other versions do I have? This is one I need 3.1 0.25 SDK 3.149 and AP net core run time 3.1 0.25. I'll go to windows and download 64. This is the one that we're looking for. I'll access it, install. Yes. These are all important programs for us to complement the packaging of the project from Unreal engine. It needs to be downloaded to windows, so Windows is compatible with and the packaging of it. It finished, close. So now we've got two things that is installed. Windows SDK and the.net. Still there's a third thing that needs to be downloaded. We need the Windows Visual Studio. And we want to get the community addition because it's free and we'll do download. It got installed. Visual Studio 2022. Yes, continue. Great. So it asks me which things do you want to add with the installation. So I want the.net. I want desktop development with C plus plus, and I want game development with C plus plus, and I'm going to install. Done installing. So there is something I need to copy from one file to the other. I'm giving you all the things that could occur to you as a problem, rather than downloading one by one and building and then error go back. No, we will download all what, we will need, copy, whatever we need, and then we will package at once. I'll go to EP games here, I'll go to Unreal Engine 5.1 and engine binaries. I'm going to go to third party. I will take DoP Net. When those host effects are Okay. So I think, guys, when we downloaded dotnet DK 3.1, and then we downloaded Visual Studio. Maybe it override the 3.1 that is in the.net that is downloaded dotnet six, not 3.1 that we want. So it's different. So it changed the user interface and also the file hierarchy structure. So I'm going to try to download this one and see does it override or not? No, it's the 3.1. Let's look furthermore into the folders. Automation tool, exactly. So this is the folder we need to copy the object inside it. No from FX R, I'll go back again. Other than the third party, I'll go to.net, I'll go to automation tools, and here I'll do paste. It's called host fX R DLL. Great. Now I'm going to close real engine to double check that everything got downloaded on it. I want to make sure that everything is okay. We want to try to package our project now. We'll go to Unreal. We'll open our project again. And we will go to platforms, windows, and I'll do package project, and from the game, I'll do select folder. Let's see. Does it work or not. If you guys realize it was not even packaging. It was not even going through the process before. Now it's going through the process smoothly. It's possible that we get an error, and it's possible that we don't get any errors and it packages correctly. By the way, guys, it could give me errors and still package. Okay, great. Package now, package complete. We want to go see where's the location of the package. We said desktop optimized, and we've got the game and from the game windows, and there we go, that's the file. We'll do minimize for unreal. Double click now. Now the file works as it's a different software. I can't walk, so there's some stuff we need to fix with the player start. Menu is working, but I can't see if it's changing anything. Okay, but everything is working well. So Escape is not going to close it. We need to do A ten F four. We will do it in unreal now. So when we press escape, the file closes. It's fine. So what I want to do now is I want to do a player start inside the scene. I want to check if I've got a player. I don't have a player start. So I'll go from the create. From the three points, I don't have def player starts. We've deleted it by mistake. So we'll add from here and we'll do player start. Player start. There you go. Drag a drop here, and let's put it where we wanted the player to start in the beginning. We deleted the players start when we had doubts with the animation in the sequencer. I had no problem then. I don't want the player start, I can take the first person blueprint and just drag it and drop it to the scene. Since this is the one that we edited, but the first person character, we've got it in the scene already, but we want to start with default player start. Now I'll do play. It's playing correctly. Now I want to try to package again, so we'll go to the game folder and we'll delete it and try to save here again. And I'll go back again and package our project again. Same place, select folder. So this time, guys, it's possible that it will package even quicker than first time. Why? Because first time always calculates things for the first time. So now it took a quarter of the time. So this is an amazing thing as well. So I will go and check our package now and double click here and see. It's playing and everything is okay. It's taking time to read the materials. We've got now full control in our experience, and it played with the different editors. So the door opens. Everything looks great. Tab living room, floor is changing. Perfect. Sofa is changing. Nice. Lights off and on sound Lights is turning on. Perfect, turning off. Mic is not turning off. Let's try again. Music is not turning off. That's the first error that we need to fix. Let's go to the kitchen. In the kitchen, we did not do anything. We did the water. Let's try the water. Water is functionally working perfectly. This chair needs material. Nice, it opened, animation worked. We need collision on the stairs. Tu Ma hole. TV is not playing. It's closing, but it's not playing. Model is changing perfectly. There are some things we need to fix, Alt and. First thing. We'll go to real, we'll go to level blueprint. A and I'll do here, keyboard, Escape, exactly. On click, I want to execute console execute console command, and I will type in here, quit. This way when we press escape, it will close our experience without us needing to do Alton four. That's first thing. Second thing, we want to give collision to the stairs. We'll go to the stairs, double click from here. And the stairs, in this case, guys, I can give it a complex collision for the speed of the video. And also because the stairs is simple mesh. Or I can do multiple collision boxes and, you know, put each one on each landing. So I do complex collision. Now we'll do play, and we want to check the stairs. And the speed I feel for the exterior is a bit slow. Now it's got collision. Perfect. Okay, great. We fix this. Now, this chair we need to give material four. So let's take this chair for now. Or we go to this chair and we search for the material and see what's the error here. Let's assign this one. No, let's assign this one. This one looks even better. Okay, guys, now we want to fix the TV. The video is working correctly. We fixed the video, we fixed everything, but still the audio we need to work on. But don't worry, we'll explain how we fixed it completely. Tab Mita Hall video is playing. Audio is playing well. We close it, it closes, we play it plays from the beginning. Escape closes. What I want to do, guys, in the code of our blueprint of the TV, we want to do a delay. So we'll go to blueprints and from here, I'll go to widget and from the widget, I'll go to graph. We want to look for the blueprints of the TV. Metahol, TV on TV off. We did a delay before it works already. This delay, we can do 0.35, for example, it does not hang. But it worked in everything as well. Just in case I want to delay. Maybe there's no need for delay. So let's connect it directly. So it works instantly without any delay. Let's check in the editor, how's it going? Tab, Meta, turn on TV, turning on turning off. It's playing on again. Okay. Perfect. So the delay was okay for us to remove. What did we do for the TV to work, guys? First thing, we went to the movie. That's the first problem is that we called the folder that we want to put the TV in movie. So unreal by default created an empty folder called movies because it should be movies. This is an absolute value. And in the file pad, there was a warning here. This file will not be packaged. That was the error because the path was wrong. So we went again from content from here, from the movie that we did. Movie is the correct one, and movie is the wrong one. So I copied everything from movie inside movies, even like away from unreal, like in the Explorer. We also brought another video of the TV that is m4v. So we brought another video that is MP four, because MV Unreal engine does not work with it. So in a software like format factory, I brought the m4v, I changed it to MP four file, and MP four works 100% with Unreal. And I moved it to the correct location that is movies. From movie to movies. That's one of the things. Based on it, the mark that is next to the file path has gone, and it's 100% correct. That's the first step. Second step, I went to edit project settings from here. I went to movies. And from startup movies from here, I added an array. It was deleted from here. I added an array from here, and I picked where the file that I'm going to work on. Again, where's the file desktop, optimized content then content movies. So because I put MP four here, it read it, and I did open. So everything is great now. And then I did file platforms, windows, package, and it worked perfectly. Before this, I want to do collision to this floor. So double click from here, I'll go to collision, I'll do add box simplified collision, save and now I'm get a package. So I will go to windows. That's the correct file. I will delete the old one. And I will do select folder. It's referable if we do shift and delete because we're not going to need it, but it's okay if we delete it. So packaging complete. So the packaging has became even more quick. And we go to game windows, we double click on the experience. There you go. Tab Mahle play. It's playing. Close, it's closing. Change model, it's changing. Mitterhol is 100% functional. Okay. Great. Now what's left for us to make it work is the sound. So we finally found a solution for the problem. The solution is that, remember, guys, we converted our sound into blueprint. That's the normal sound que, and the other one we changed to blueprint. That's the one. So I will take this sound, the one that's not blueprint. I'll take this one, and I'll go to Blueprints from here, and I'll do convert selection to Blueprint class? We get this class. We do double click on the class itself. Audio, we don't have anything else. And from event Begin play, we do set sound for the audio component that we've got. So I do drag from here and I do set sound and I do audio component, and we get exactly the same node. Why did we do this? So there is a blueprint class that we can call inside our Widgit blueprint. Because widget blueprint is concise with things. We can't do everything on it. So what we did is we asked for a blueprint class. So we're going to go to the graph. We came here. And first, this is what we did. Switch on variant by name. And we did it based on the variant. Now, what we will do is we will do it based on the actor. So we did get all actors of class, we did get, and then we did a flip flop, and from the flip flop, First time we did from the g from the target audio component, we did play, and one time we did stop. And in the Git all actors of class, we made it sure that is the sound piano, which is the class blueprint of the sound that we did. So this way, our code has become 100% functional. So when we do play from here, it's going to tell us play of the audio component that is inside the class blueprint. So this way it worked 100%. So it heard the sound. The widget heard the sound of the class blueprint. But before it had a problem with playing the sound from the widget itself. First time play and first time stop and through a flip flop because it's going to turn on and off through the same button. Why didn't we do this? Because simply, when we first click we do, it plays. So it does not stop. It restarts the audio. Because the audio is already playing in the level, so we want the audio to stop in the first button and in the second button to play. So just a switching thing we did. And these are all nodes that we know, compile save. Now we do play from here. We have a piano sound now. We do tab, we go to living room, we clicks, piano sound goes off. We go to the sound again, sound on. So we want to do package for this and here that. So we'll do package project, and now we will go to the game, shift and delete. Awesome, Let's packaging the project. This way, I believe we fixed all the mistakes that we've got in the package since the first package that we did. This way, I'm comfortable giving you this lecture so you can encounter whichever problems that you guys encounter and be able to solve it all. Let's see this package, and then we will be able to verify how is it going. Okay, so it has ended the packaging complete, show output log, game, click, FHR optimized. Okay, we saw that the TV worked. Now we want to debug and see if the sound is working. Okay, sound is working perfectly now. We can hear piano. We do edit. We go to living room. It's turned off, and we click it again. It's turning on. So now, guys, our package is 100% work correctly. So now I will delete the old sound, but it will be deleted from the variant manager. But since we are no longer needing the Variant manager, it's okay. But what we did is that we minimize the volume multiplier and just leave it there if we want to go back to the variant manager and keep everything. We can do that. There's no problem in this. But the sound is working perfectly in the experience now just in case I want to connect the variant, I can do it. Everything is correctly function. Now, I hope you guys benefit from this lecture, see you guys in the next one.