ForceToDesiredWorkerCount()
Forces the Editor to use the desired amount of worker processes by either spawning new worker processes or shutting down idle worker processes.
Read time 1 minuteLast updated a day ago
Definition
- Type: Method
- Namespace: UnityEditor
- Assembly: UnityEditor
public static void ForceToDesiredWorkerCount()
Remarks
Unity starts new import worker processes, or shuts down idle import worker processes, until the number of worker processes matches AssetDatabase.DesiredWorkerCount.
This method blocks the calling thread until the number of worker processes matches the desired worker count. Unity only shuts down worker processes that are idle, so if there are more worker processes than the desired count, this method waits for the extra workers to finish importing.
Call this method only after the Asset Database starts.