Search Unity

  1. Are you interested in providing feedback directly to Unity teams? Sign up to become a member of Unity Pulse, our new product feedback and research community.
    Dismiss Notice

Help Wanted BuildPlayerScripts step in SBP

Discussion in 'Asset Bundles' started by liortal, Jul 20, 2021.

  1. liortal


    Oct 17, 2012
    I am looking at the general build log (json) when working with SBP, the longest step is BuildPlayerScripts.

    I was wondering what this step is, and why are scripts being compiled as part of an asset bundle build?
    Is there any way to avoid this step or to optimize it ?
  2. OndrejP


    Jul 19, 2017
    No, you can't optimize it and it's necessary.
    Scripts are built for target platform and serialization format is determined from that.

    It's not just serialization format, but also references. There might be #ifdefs in scripts, which could change what assets are referenced and what fields are serialized, that's why it's needed.

    If you have a tons of 3rd party scripts in the project, I'd suggest to turn them into DLLs (where possible).
    We have a LOT of scripts in project and compilation usually takes about 3s, which is okay IMO.