In a nutshell, Unity recommends you separate your canvases based on whether you will update them or not. The canvas that you don’t update will have purely static elements and be called the static canvas. The canvas you do update will be the active one. The reason it’s done this way is when you modify an element inside a canvas, it’s considered ‘dirtying up the canvas’ and so every element inside of the canvas must be redrawn.
Unity also raycasts every image on the canvas. It’s important that if an image isn’t clickable, you turn off raycast target.
Don’t turn off the canvas object, instead turn off the canvas component. It’s more efficient.
Coroutines are extremely useful for any time specific function, however when one uses the yield return new function, that uses a lot of garbage allocation resources as every time the new keyword is used, Unity has to build that new thing on the spot.
Day 1 of optimization class and we’re going to learn about the profiler! To open it, just go to window/analysis/profiler. It was recommended to dock it below. I’ll use my first 2D shooter game as the subject to be optimized!
Running the game, we’ll see a realtime chart of how…
Wow! What a journey it’s been! I’ve now programmed my first space shooter game, learned game programming in various styles from 2d, 2.5d, and a simple zombie fps to learning about more serious applications that take advantage of Augmented Reality and Amazon services! While I’m learning about optimization, I’ll also be attempting to create some games so stay tuned!
Asset Bundles are a great way to get more content into your app, maybe you want to create DLC, or if your app is too big, you can create a smaller base app, and then download bundles for playing content as you go.