Version: Unity 6.6 (6000.6)
LanguageEnglish
  • C#

AssetDatabase.DesiredWorkerCount

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

public static int DesiredWorkerCount;

Description

The number of import worker processes the asset pipeline aims to maintain during an Asset Database refresh.

The asset pipeline moves the number of running worker processes toward this value when possible, so the number of processes that actually run can be higher or lower. To make Unity start or shut down worker processes immediately, call AssetDatabase.ForceToDesiredWorkerCount.

Worker processes only import assets when the Asset Database refreshes out of process. For more information, refer to AssetDatabase.ActiveRefreshImportMode.

The default value comes from the __Desired Import Worker Count__ setting, which Unity calculates for a new project as a percentage of the logical CPU cores on the system. The -desiredWorkerCount command line argument overrides that setting.

Unity applies this property to the current session only and doesn't save the value.