The Unity Profiler, Using it to clean up a game.

It has been a bit since my last post however I have some good stuff to show everyone in the next few posts. First however I want to go over the Unity Profiler.

Although I will not go into a super amount of detail but I think it is good to go over this, especially for myself.

The Profiler can be enabled through the window menu and what will you see?

The profiler menu can be really scary at first, however reading it isn’t too bad once we take a look at what it actually is showing. The first thing however is to first set the bottom left overview from Timeline to Hierarchy so we can actually read what we are looking at.

In this window I have disabled everything except for scripts and through this I can see how many resources are being used to run this game. Although it only shows in reality a few seconds at a time, it can be extremely useful by watching out for any spikes in frame rates so that we can get to the bottom of optimizing our game.

When paused we can scrub through to see the details of any spot currently recorded. One thing to note is that “EditorLoop” is showing that the Unity Editor is taking up quite a bit of resources, and unfortunately that will always be the case. BUT we can look out for certain other things to optimize our game.

For example in our player loop, the Camera.Render is taking up the most so the us take a look. By opening it up we can see a break down of EVERYTHING that may be eating up resources and a big thing to look out for is our GC allocation. GC Allocation is basically the memory usage concerning any Garbage Collection. One easy way to spot problems is when you see too high of a GC Alloc going on during spikes. In this case, the frames have been steady and the GC Alloc has been low, if we started to see a GC Alloc of around 30KB or more… now then we would have a problem.

I’ve got something big to show everyone in a few posts! See you next post!




Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

How to fail your CK{A,S} Kubernetes Certifications

Mail In A Box + Amazon AWS + Funnelbake = ❤️

Code also has emotions. Let's comment only when required.

Is it a Circular Linked List ?

Download In @!PDF Introduction to Earthquake Engineering Read ^book %ePub

The best IDEs and Text Editors for Python

How I Reduced the Burden of Context Switching as a Software Developer

Man working on laptop

Continuous Integration for a Mainframe App

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Edward Kim

Edward Kim

More from Medium

How to Win the Race Using Director

Platformer: Elevator

2D Mobile: Setting Up The Player

Unity profiler — the forgotten child of game developement