Search Unity

Could the new Scriptable Build Pipeline work in multi threads?

Discussion in 'Asset Bundles' started by jayatubi, May 8, 2019.

  1. jayatubi

    jayatubi

    Joined:
    Dec 9, 2013
    Posts:
    143
    There are thousands asset in my project need to be built as asset bundles. Currently Unity builds them one after another in a single thread mode which is extreme slow.

    It that possible to make the asset bundle building process to work in multi threads mode?
     
    Last edited: May 9, 2019
    Petr777 likes this.
  2. Ryanc_unity

    Ryanc_unity

    Unity Technologies

    Joined:
    Jul 22, 2015
    Posts:
    324
    Multi-threads is not possible today as the Unity APIs that we use are not thread safe. We have discussed internally how to implement a Multi-process version of Scriptable Build Pipeline and think it will work, but nothing implemented for that as of yet.
     
  3. jayatubi

    jayatubi

    Joined:
    Dec 9, 2013
    Posts:
    143
    Really need that and hope there could be a beta testing.

    Besides I've seen someone used to split a large project into a few small ones. Each of the small projects contains only a part of the assets and they could be built in parallel by launch multi Unity processes. Then gather all the asset bundles for the final build.
     
    Petr777 likes this.
  4. Petr777

    Petr777

    Joined:
    Nov 8, 2017
    Posts:
    36
    @Ryanc_unity can you tell please, are there any news on multi-threaded build?
     
    xaow037 and Jes28 like this.
  5. Ryanc_unity

    Ryanc_unity

    Unity Technologies

    Joined:
    Jul 22, 2015
    Posts:
    324
    Pretty close to the same answer as before:
    Multi-threads is not possible today as the Unity APIs that we use are not thread safe.
    Though we have fixed some of those issues. In fact in the SBP release back in 04/2020 we added threading support for the archival process and since then more things inside of SBP have become threaded, though still not where we want to be scale and performance wise. It's quite a painful and large problem.
     
unityunity