Hello, welcome to this lesson, in Unreal Engine. In this lesson we'll learn how to check performance in Unreal Engine. Launch Unreal Engine. We'll create a new project, select games, then blank. Check on starter content. Navigate to your project folder. We'll name this project Profiling. A good test level to use is inside the starter content folder. Open starter content. Open maps. Open the starter map. Now save current level as, Go to content, right click. We'll make our folder, call it maps. Open that folder up. We'll save this as Performance. Next, we'll make this default level in the project settings. Go to project settings, type in Default, we'll make performance default. We also wanna check one more setting. So we're gonna look for the word smoothing, and we'll make sure a smooth frame rate is unchecked. Close the panel. This level contains meshes, textures, lighting, particles, sound, and dynamics. When building a game that you wanna publish, it is important to check performance frequently using the profiling tools. You'll need to play your level in Standalone mode to best simulate the deliverable game. Click the three dots next to play and select Standalone. In a few moments, a separate game window will open and play. You can toggle full screen by pressing F11. Press to tilt the key which is located in the upper left of your keyboard. A command line will appear at the bottom. Type in stat unit. Hit enter. Stat unit will show the time per frame for each step as we discussed. The order in which your game runs is for each frame, the game is processed using the CPU. Then a draw command, which is what we are rendering is processed. And finally, a GPU command is processed before you see the final pixels on your screen. Hit to til the key again and type in Stat FPS, hit enter. This will display the frame rate and frames per second or FPS. If you're seen as running at a typical 60 FPS, each frame takes about 16 milliseconds to display. The profile will break down all the processes you choose to view and display the time each process takes a milliseconds. What you wanna look for is what process texture, or mesh is using up a lot of frame time. Because each thread waits for the first thread to finish. One of those processes in that thread may slow down a whole final frame. Look up at the sky, you note the frame time for each stage, the numbers are relatively low. Now orbit around to look at the sparks and flames. The numbers go higher because what the virtual camera sees needs to process the draw calls and GPU. We could also create some blueprints to allow the user to view frame rates during gameplay. First, let's exit our view by hitting the tilde the key, then type in exit. And then hit return. In your content folder, right click Create a blueprints folder. Open that folder up, right click. I'm gonna go to user interface and select a widget blueprint. Click user widget. We'll name this WBP_FPS. Double click to open it. We'll search for a canvas. We'll drag in a canvas panel, close our search. Next we'll drag in a text. We'll put it near the upper left corner. In a text entry, we'll type in FPS: and a space. This will always display on the screen. So select a text box, Notice a change to FPS. We'll duplicate this control D, drag this new text box next to it. And this is the text box we're gonna send data to. So to do that to the right of text click the word bind and select create binding. This will open up the function graph. Next, we'll create a variable and name it FPS. We're gonna make this an integer. Drag this variable to the graph. Select Get, next from the return node, drag a wire from the return value and search text. Select format texts. Now drag a wire from FPS to format. This will add a converter in between to convert the integer to a text format. Compile, now we'll open the graph. Now scroll down to the event tick node. We wanna add a delay, a shortcut to do that is hold down to D key and click. We'll wire this to lay in. We'll make this delay 0.05 and the delays to make it a little easier to see the display as it's running. Next, drag FPS into the graph and choose set. Now we need a way to capture the game running frames per second information. The event tick note actually runs at the computers frame rate. So if your computer can run at a hundred frames per second, we get to execute at a hundred a ticks a second. The Delta time is the amount of seconds per tick. We'll divide one by that value. So right click and press the divide key, select divide. Drag a wire from Delta time to the bottom node and we'll enter one second to this value. So we're gonna divide one by the Delta the time. And we don't want a decimal point. We wanna truncate this value. So grab a wire out, type in truncate, then return value goes to set and we'll wire together, delay to set. Next, we'll compile, We'll close the panel. Now that the widget blueprint is complete, we can call it from a level blueprint so we can see it on screen. Open the level blueprint. There's already some Scroll to the right and drag a wire from play. Drag a wire from play and search Create, and select Create widget. From the class, select WBP FPS. Next, drag a wire from the blue return value pin and search View port. Select add to View port, compile. Close the panel, play the level after you save. You should see the FPS in the upper left corner and should change depending on the action and the level. Frame rate also changes as you're moving your camera around. To exit, hit the tilde key, type in exit. Return a play mode, back to select View port. Stop the game. In the next lesson, we're gonna learn how to optimize lighting in Unreal Engine. Thanks for watching.