Hi everyone. I'm Jeremy Bond and welcome back to the Unity Certified Programmer exam preparation course. In this video, I'm going to introduce you to a tool called the Frame Debugger. That is one of those kind of hidden gems in unity that has so much capability to help you debug what's going on and you're rendering of your scenes but a lot of people miss. So, let's dive in and take a quick look at it. So, here we are in the stealth game and I'm taking a look at the standard profiler we've looked at before. Let's go ahead and pause things and look around a bit. So, I'm mostly interested in my rendering. So, here's my GPU usage. It tells me a little bit of information and if I click down here, I can see, okay, camera render is 94.4 percent sticking up 84 milliseconds. I can dig into this a little bit. There's a lot that I can learn from here. In my rendering, I can look at the number of draw calls I have and the amount of batching I have. But if I really want to see, so here I've got 141 draw calls. If I go up here and un-pause, now you'll see that if I zoom in, it goes from 142 to 203. That's a tremendous number more draw calls, and I'm really not sure where it's coming from. This is where the Frame Debugger comes in. Now, one thing I need to do, I've learned this, is I'm going to have to turn off the stealth player camera script because even though the game is paused, if I don't turn this off, then when I enable the Frame Debugger, it will still kind of enemy my camera back, I'm not sure why that is, but I'm going to go ahead and turn off the self.player script, so it's not going to pull back. I'm going to go to Frame Debug and I'm going to click, Enable. Now you can see what this does is it gives me a list of all 213 draw calls or all 213 events that are happening. I guess if we go back to the profiler, we can see there's 203 draw calls. There's two in three draw calls and 10 like clears or something like that. I can actually step back through the entirety of drawing my scene and see every piece that's happening. I can go step-by-step, and if a single thing is drawn, like it if a meshes drawn, it'll actually highlight the mesh in the hierarchy. There you go. The hallway walls. It's drawing that. So, it's going ahead and getting this information. Here you can see that it's now going through draw calls for shadow masks. It's making my shadow maps at various resolutions, and then it gets into this collect shadows, collects them all together for the actual scene it's going to be rendered, sets of security gate, sets up the hallway walls, and then starts rendering all these different things for my robot. This ECS 17 robot. Now I can see this is probably where all those x-draw calls came from, because the robot has so many individual draw calls to create it whereas you can see that my player character just renders in a single draw call here. This is the kind of thing that the Frame Debugger can help you figure out. There's a lot more going on. I just wanted to introduce you to this, because I think it's such a cool concept. I think it's such a cool tool to be able to use. This as you'll see in the expert gameplay programmer course can actually also be used to help you understand what's going on with UI calls. There's not a lot UI in this but I wanted to mention that as well. So, there you go. This is various post-processing effects that you just saw there, and this is setting up the overhead map and then you'll see that it's really just a single call to get that overhead map up in the top left corner and the grain and the post-processing color grading on it and everything. That's the Frame Debugger. I hope you enjoy checking it out. I'll see you in the next video.