Choose one thing to do at the same time:
- Profile your game
- OR work on the editor.
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.
Table of Contents
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 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
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
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.
Go ahead and grab your copy.