Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


DesiredWorkerCount

The number of import worker processes the asset pipeline aims to maintain during an Asset Database refresh.
Read time 1 minuteLast updated 6 hours ago

Definition

  • Type: Property
  • Namespace: UnityEditor
  • Assembly: UnityEditor
public static int DesiredWorkerCount { get; set; }

Remarks

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.