Unity Editor Performance Tips

Unity Editor Performance Tips

Sep 25, 2023

Here are a few tips for improving the performance of the Unity editor (note: these don't improve the performance of your game, but the speed at which you can do your work in the Unity editor).

Assembly Definitions

Breaking up your code into assembly definitions reduces the amount of recompiling Unity needs to do when you make code changes. It works by siloing your code into different assemblies, which only have to be recompiled when the code inside them changes or code they reference in another assembly is changed.

More information:

Unity documentation for Assembly Definitions

Working with Assembly Definitions on Unity Learn

Remove Unused Packages

Unity will include some packages in your project by default, but you may not need all of them. Go to the Package Manager and remove packages you don't need.

For example, of you use Visual Studio as your IDE you won't need the Rider package (and vice versa). If you don't use Unity's source control you can remove that package. And so on.

Removing the excess packages will ensure they are not being recompiled regularly.

Hot Reload

There are a few 'hot reload' products available for Unity. These work by updating only the scripts you change rather than recompiling everything. These products can reduce recompile time to almost a negligible amount.

One such product is called Hot Reload, which you can try for free (and even keep using for free if you are using Unity's Personal product).

More information:

Hot Reload

Disable Auto Refresh

Disabling auto refresh prevents Unity from automatically recompiling your scripts every time you make a change. You can turn this off and press Ctrl-R / Cmd-R when you want to force a recompile. This can be very useful if you are iterating on scripts very quickly and don't want to have to wait for Unity to recompile every time you make a small change.

Go to Edit > Preferences > Asset Pipeline and change Auto Refresh to Disabled.

You can of course re-enable it at any time.

General Tips

  • Keep your project files on an SSD drive.

  • Use a recent version of the Unity editor (Unity often improves efficiency and performance).

  • Use custom inspectors to make configuration of your scenes easier (I make a Unity asset called Auto Custom Inspector that makes this quick and easy).

Ti piace questo post?

Offri un caffè a DJ

Altro da DJ