By default, Unity imports assets one after another sequentially on the main Editor process. However, Unity also supports parallel importing for some types of asset. Parallel importing uses multiple processes to import assets simultaneously, which is faster than the default sequential method of importing.
To enable parallel importing, go to Edit > Project Settings > Editor, then under the Asset Pipeline section, enable the Parallel Import checkbox.
Unity’s Parallel Import feature supports only certain types of asset. It applies only when the Editor is performing its standard asset database refresh, which occurs when it detects new or modified assets in the Project folder and automatically imports them.
The specific types of asset which Unity can import in parallel are:
Other types of asset are always imported sequentially during an asset database refresh.
Some Asset Database API methods also respect this setting, if you use them to import, refresh, or create Texture or Model assets. These are:
Because parallel imports operate on separate processes, any side effects of your scripted importer code also take effect in that process rather than the main Editor process. Side effects that run on separate processes can cause unexpected problems. For example, if you modify a static variable on a C# class during import on a worker thread, that modification is not automatically visible to code running on the Editor’s main thread.
Any code that you write for importing should always be self-contained, deterministic, and shouldn’t change the context it’s running in (for example, it shouldn’t change the Editor settings or create new assets on disk). Following these rules helps your importer code avoid parallel threading issues. It also ensures that your import results are always consistent, and that the Editor always uses cached artifacts instead of unnecessarily reimporting your assets.
In the Asset Pipeline settings, there are three settings that allow you to control the behaviour of the import worker processes. These settings are project-specific.
The import worker process controls, in the Project SettingsA broad collection of settings which allow you to configure how Physics, Audio, Networking, Graphics, Input and many other areas of your project behave. More info
See in Glossary window.
|Setting Name|Description|
|:–|:–|
|Desired Import Worker Count|The number of import worker processes that the import pipeline considers the optimal number to run in parallel.|
|Standby Import Worker Count|The minimum number of worker processes to keep, even if they’re idle.
If there are more worker processes than this, Unity shuts down import workers that have been idle for some time, to free up system resources. This property allows you to manage how Unity balances system resources when some processes are idle, compared with the time it takes to start up new import worker processes.
You might see an improvement in import performance by increasing this value if you are frequently iterating on model, animation or texture work, and are therefore frequently importing batches of models or image files.|
|Idle Import Worker Shutdown Delay|The amount of time in seconds to wait before shutting down an idle worker.|
You can also control the default values that Unity sets the Desired Import Worker Count for new projects. To do this, go to Preferences > Asset Pipeline > Import Worker Count %.
When you create a new project, Unity uses the Import Worker Count % value to assign your project’s Desired Import Worker Count value to the percentage of the number of logical cores available on your system.
For example, if your system has 16 logical cores and this preference is set to 25%, the Desired Import Worker Count for new projects is 4. If you set this value too high, your import worker processes need to compete over other processes and system resources such as reading and writing files. The default value of 25% is suitable for most situations.
When you visit any website, it may store or retrieve information on your browser, mostly in the form of cookies. This information might be about you, your preferences or your device and is mostly used to make the site work as you expect it to. The information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies. Click on the different category headings to find out more and change our default settings. However, blocking some types of cookies may impact your experience of the site and the services we are able to offer.
More information
These cookies enable the website to provide enhanced functionality and personalisation. They may be set by us or by third party providers whose services we have added to our pages. If you do not allow these cookies then some or all of these services may not function properly.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us to know which pages are the most and least popular and see how visitors move around the site. All information these cookies collect is aggregated and therefore anonymous. If you do not allow these cookies we will not know when you have visited our site, and will not be able to monitor its performance.
These cookies may be set through our site by our advertising partners. They may be used by those companies to build a profile of your interests and show you relevant adverts on other sites. They do not store directly personal information, but are based on uniquely identifying your browser and internet device. If you do not allow these cookies, you will experience less targeted advertising. Some 3rd party video providers do not allow video views without targeting cookies. If you are experiencing difficulty viewing a video, you will need to set your cookie preferences for targeting to yes if you wish to view videos from these providers. Unity does not control this.
These cookies are necessary for the website to function and cannot be switched off in our systems. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms. You can set your browser to block or alert you about these cookies, but some parts of the site will not then work. These cookies do not store any personally identifiable information.