Sponsored By

Featured Blog | This community-written post highlights the best of what the game industry has to offer. Read more like it on the Game Developer Blogs.

Profiling Can Now Be As Smooth As Silk

How to profile and work on the editor at the same time without affecting your performance results with the Unity Standalone Profiler

Ruben Torres Bonet, Blogger

July 27, 2020

4 Min Read

Choose one thing to do at the same time:

  • Profile your game

  • OR work on the editor.

Why choose?

Because profiling AND using the editor at the same time will generate hiccups and ruin your profiling session. And you don't want to start all over again.

So often enough, you just idle in front of the profiler waiting for the moment you wanted to capture all along.

And do not dare touch the editor. Forget about compiling, importing textures or clicking anywhere. That will only bring unpleasant news.

You see, neither waiting nor endless profiling is any fun.

But that no more.

Since Unity 2020.1, you can launch the Unity profiler in standalone mode so you finally can:

  • Make the profiling process much more stable.

  • Work on the Unity editor while you profile, without affecting each other's performance levels.

  • Reduce noise that the Unity Profiler generates in your play-in-editor profiled data.

Profile-Standalone-Thumbnail

Table of Contents

1 What's the Unity Standalone Profiler?

2 How to Run the Unity Standalone Profiler

3 Should I Use the Unity Standalone Profiler?

4 Are There More Tricks to Work On My Game Performance?

What's the Unity Standalone Profiler?

Since Unity 2020.1, we now have the option to start the profiler as a standalone process.

This means, the Unity editor and the unity profiler will run in different processes so they don't block each other. In other words, the OS will give you more mercy.

This is useful for you because running the profiler logic adds considerable overhead to your game session. And that noise isn't pleasant to hear.

Just think of parsing performance metrics, drawing them and handling the expensive user interaction through charts, tables and filters. Any of that will worsen the performance of the editor and hence of the profiler (and your game, if you're running it in the editor).

Here are the two biggest benefits of running the unity profiler in standalone mode:

  • Remove the propagation of hiccups between the unity editor (plus its running game) and the profiler.

  • Reduce the baseline cost of the profiler added to your in-editor running game.

The solution is very simple since Unity 2020.1.

It's just waiting for you to press the right button.

How to Run the Unity Standalone Profiler

Launching the profiler in standalone mode is straightforward.

This option is located at Window -> Analysis -> Profiler (Standalone)

Unity Profiler: Launching Standalone Mode

Unity Profiler: Launching Standalone Mode

Unity Profiler: Launching Standalone Mode

Unity will greet you with a nice pop-up to sell you on the benefits of using the standalone unity profiler.

Unity Profiler: Standalone Mode Confirmation

Unity Profiler: Standalone Mode Confirmation

Unity Profiler: Standalone Mode Confirmation

Like the warning says, it will take a few seconds to launch the profiler in standalone mode.

Once the loading completes, you'll see that the profiler spawns in a completely different window.

Unity Profiler: Standalone Mode

Unity Profiler: Standalone Mode

Unity Profiler: Standalone Mode

And it includes its own console. Yummy!

As much as I'd like to give you more information than that, that's all about it.

No bells, no whistles.

Everything works as usual and you're ready to go.

Should I Use the Unity Standalone Profiler?

Personally, I avoid using the standalone profiler when possible, mainly because it adds an extra window and it takes longer to load.

However, I found the standalone unity profiler especially useful in two cases:

  • When my clients use heavy plugins from the store that execute expensive code on the editor and randomly creates hiccups.

  • When I want to do useful work on the editor during long profiling sessions.

No matter what, the key is to be aware of the problems caused by running the profile in the same process as the unity editor.

If you need to avoid these performance problems, then running the unity profiler in standalone mode will help you there.

As always, keep this tool in your growing tool shelf and use when it helps.

Are There More Tricks to Work On My Game Performance?

Yeah, you'll find more of these neat performance tricks in my Unity Performance Checklist.

Unity-Performance-Checklist-Cover-3

Go ahead and grab your copy.

~Ruben

Read more about:

2020Featured Blogs
Daily news, dev blogs, and stories from Game Developer straight to your inbox

You May Also Like