Camera optimizations

So, I'm going to go back to our profiler,…run the game, and set this to the current frame.…Now, I still have my camera selected…and I want to show you how the camera…affects the rendering inside of your scene.…Let's change the size of the camera to 40…and we'll pause the profiler.…All of a sudden, our draw calls have dropped, dramatically.…Now, this should make a lot of sense…because we're only rendering a smaller part of the map.…Configuring the camera correctly will have a huge impact…on the performance of your game.…The goal is to show the least amount of sprites…at any one time.…

The more objects you have on the scene,…the slower the game is going to run.…Here, we can see that the draw calls…have dropped, dramatically.…We are now down to 40 draw calls…and 40 batched calls.…Another important thing that we're able to do…inside of our scene is leverage…the cameras own background color…to fill in the gaps.…Let's stop the game and take a look at the difference…between the scene and our game.…Inside of our scene, you'll see that we have tiles…

Resume Transcript Auto-Scroll

Author

Released

1/6/2016

Faster graphics make better video games. Learn how to use Unity 5's tools to improve the performance of your 2D graphics by optimizing draw calls to the CPU. These tutorials from expert game developer Jesse Freeman cover analyzing your graphics with the Profiler, viewing individual draw calls with the Frame Debugger, and optimizing textures and the UI layout of your game to improve rendering times and performance during gameplay.