How to start using the profiler in Unity

It is almost impossible find out what is affecting performance in your game without using a profiler. Luckily Unity comes with one built in. Let’s go over the basics of how to use it.

You find the profiler under Window->Analysis. Open the window and dock it:

By default the profiler is set to Timeline and have Deep Profile disabled. Change Timeline to Hierarchy and enable Deep Profile:

When you click on Play the profiler starts recording the performance of each frame. If you click on a frame on the profile graph the game will automatically pause and you can start to analyse that frame. You can easily analyse any other recorded frame by flicking on another part of the graph:

You can enable or disable the specific type you want to analyse by clicking on the type:

To make it easier to spot issues in the frame, sort by either Total %, GC alloc or Time ms:

To find out what specific part is causing the issue click on the arrow to expand until you get to final part. In this example you can see that there is an issue with the update function in the Inventory script:

Good luck!




Unity / C# Game developer

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

Recommended from Medium

Green Rabbit Community Update

GraphQL quick tip: How to pass variables in GraphiQL

Making a Child Design

Pdf To Powerpoint Converter Software Mac

Build Your First Callbot (IVR)

What is a Sugar Daddy Dating Apps and how it Works Online for Ladies

Enhance your SEO with Drupal Semantic Web

Top 8 iOS Emulators for PC in 2022 (Windows & Mac) to Run iOS Apps

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
Niklas Bergstrand

Niklas Bergstrand

Unity / C# Game developer

More from Medium

Who Dealt This Mess? 😊 Backstory for Web 3.0 aka web3

The 4th generation of university is the first of three generations inteversity

Destiny Falls under Sony’s Jurisdiction after the Bungie Acquisition


CS373 Spring 2022: Matthew Escobar Blog #2: The Introductory Weeks