Unity Editor Slow? Speed Up Play Mode, Compiles and Imports

Illustration: a snail icon transforming into a glowing rocket over an editor window

Pressing Play takes ten seconds. Every script save means a “Compiling” spinner and a “Reloading Domain” bar. Importing a texture freezes the Editor. A slow Unity Editor costs you hours each week, and most of it is fixable. This guide covers the biggest wins first: Enter Play Mode options, assembly definitions, asset import settings, antivirus exclusions, and how to find out what’s actually slow with the Profiler.

Find Out What’s Slow First

“Unity is slow” usually means one of four things. Each has a different fix:

  • Entering Play Mode takes a long time.
  • Saving a script triggers a long compile and domain reload.
  • Importing or changing assets takes a long time.
  • The Editor stutters while you work, even when idle.

Time each one so you know whether a change helped, and watch the progress bars: “Compiling Scripts” is the compiler, “Reloading Domain” is the reload, and “Importing” is the asset pipeline.

Faster Play Mode: Enter Play Mode Options

By default, pressing Play does a domain reload (resets all scripting state) and a scene reload. In bigger projects, the domain reload alone can take several seconds.

Open Project Settings > Editor > Enter Play Mode Settings. In Unity 6 choose Do not reload Domain or Scene (or reload only the scene). Play Mode then starts almost instantly.

The catch: static fields keep their values between play sessions, and static event subscriptions stay. Code that assumes statics start fresh breaks. Reset statics explicitly:

using UnityEngine;

public static class ScoreKeeper
{
    public static int Score;
    public static System.Action<int> Changed;

    [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)]
    static void ResetStatics()
    {
        Score = 0;
        Changed = null;
    }
}

Singletons with a static Instance need the same treatment. Unity’s own packages support this setting, but some older Asset Store assets don’t. If something behaves strangely on the second play, that’s the first suspect.

Faster Compiles: Assembly Definitions

Without assembly definitions, all your scripts compile into one assembly, so changing one line recompiles everything, including big imported assets. Splitting code into .asmdef assemblies means Unity only recompiles the changed assembly and those that depend on it.

Biggest wins:

  • Put third-party code (in Assets) into its own assemblies. It rarely changes.
  • Split your code into Runtime, Editor and Tests assemblies.
  • Keep frequently edited gameplay code in a small assembly that few others depend on.

The assembly definitions guide walks through a full setup and the reference errors you’ll hit. Note that the domain reload after compiling still happens; it scales with the total amount of code and assets loaded, not just changed code.

Other compile-time tips:

  • Auto Refresh off (Preferences > Asset Pipeline): Unity won’t recompile on every file save. You press Ctrl+R when ready. Handy when editing several files at once.
  • Remove unused packages from Package Manager. Each package is code that compiles and loads.
  • Avoid giant “god” scripts that everything depends on; they force wide recompiles.

Faster Imports

  • Max texture sizes. Importing 8K textures you display at 1K is slow and wastes memory. Set appropriate Max Size per texture.
  • Compression. Texture compression on import is slow, especially for some mobile formats. Batch texture changes together instead of tweaking one at a time.
  • Parallel import. Project Settings > Editor has a Parallel Import option, which imports textures and models using multiple worker processes.
  • Model import. Turn off features you don’t use: Import Cameras, Import Lights, animation import on static meshes, Read/Write enabled, and Generate Lightmap UVs if you don’t bake.
  • Switching platforms reimports textures. Avoid frequent platform switches, or use a separate project clone for a second platform.
  • Accelerator. Teams can share import results with Unity Accelerator, a local cache server.

Antivirus and Cloud Sync

Unity writes thousands of small files to Library and Temp. Real-time antivirus scanning every write can double compile and import times. On Windows, add exclusions in Windows Security for:

  • Your projects folder.
  • The Unity Editor install folders.
  • Your IDE’s process, if your antivirus supports process exclusions.

Never keep a Unity project in OneDrive, Dropbox or iCloud Drive. Sync tools fight Unity over the Library folder, cause slowdowns, lock files and corrupt the cache. Use git for backups instead; the git setup guide shows how.

Also make sure the project is on an SSD. A project on a spinning hard drive is painfully slow to import and reload.

Profiling the Editor Itself

If the Editor stutters while idle or is slow in Play Mode, profile the Editor:

  1. Open Window > Analysis > Profiler.
  2. Change the target dropdown from Play Mode to Edit Mode.
  3. Record for a few seconds and look at spikes in the CPU module. Expand the hierarchy to see which editor window or script is responsible.

Common culprits: a custom inspector or editor script running heavy code in OnInspectorGUI or EditorApplication.update, a Scene view with huge numbers of gizmos, or an Asset Store tool polling every frame. The Profiler guide explains how to read the timeline.

For slow domain reloads, Unity 6 can log reload timings. Search the Editor log for “Domain Reload Profiling” to see which assemblies and initializers take longest. [InitializeOnLoad] static constructors that do heavy work are a common cause.

Other Quick Wins

  • Close unused windows. The Scene view, Game view and Inspector all repaint. Many open windows add up. A big Animator window or Shader Graph open in the background costs too.
  • Inspector on a heavy object. Selecting a huge mesh or a large list redraws the Inspector constantly. Deselect or lock it.
  • Burst and Jobs safety checks. If you use them, safety checks slow Play Mode in the Editor. Disable them temporarily when testing performance.
  • Script Debugging mode. Debug code optimization (the bug icon in the status bar) makes scripts slower. Switch to Release when not debugging.
  • Hardware. Unity loves fast single-core CPU speed, 16 GB+ RAM and an SSD. If you’ve done everything else, the machine may be the bottleneck.

💻 Sometimes it really is the hardware

If compiles still crawl after all of this, a faster CPU and SSD make the biggest difference. See our budget laptop picks for Unity.

Troubleshooting

“Reloading Domain” takes forever after every save

Reduce the amount of code (unused packages and assets), remove heavy InitializeOnLoad code, and check the Domain Reload Profiling log.

Play Mode is fast but the game behaves strangely on second play

Domain reload is disabled and statics keep old values. Reset them with RuntimeInitializeOnLoadMethod.

Editor freezes for seconds at random

Profile in Edit Mode. Often it’s an editor extension or an asset import triggered by a file watcher.

Imports are slow only on one machine

Antivirus or a cloud sync tool on that machine. Add exclusions and move the project out of synced folders.

“Hold on” dialogs keep appearing

Unity is busy with the asset database, often from Auto Refresh reacting to many changes. Turn Auto Refresh off while batch-editing files.

FAQ

Is disabling domain reload safe?

Yes, if you reset statics yourself. Many teams use it all the time. Builds always start fresh anyway.

Does deleting the Library folder speed things up?

It fixes corrupted caches but makes the next open slow. It doesn’t speed things up long term.

Do more CPU cores help?

For imports and builds, yes. For compiles and domain reloads, single-core speed matters more.

How much RAM does Unity need?

16 GB is comfortable for small to medium projects. 32 GB helps with big scenes and when running an IDE and browser alongside.

Should I upgrade Unity for speed?

Newer versions often improve iteration times. Upgrade on a branch and compare.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *