Search Unity

Asset bundle of cube prefab takes hour to build

Discussion in 'Asset Bundles' started by Jelmer123, Mar 16, 2021.

  1. Jelmer123

    Jelmer123

    Joined:
    Feb 11, 2019
    Posts:
    243
    I have a large project and am trying out asset bundles
    Rught now I have 1 asset bundle, a prefab of a standard Cube.
    The resulting asset bundle is just 24KB
    However, building it takes AGES and it seems like the whole project is compiled anyhow.
    I'm using BuildPipeline.BuildAssetBundles.

    Is this expected behaviour?
     
  2. tgrotte

    tgrotte

    Joined:
    Apr 17, 2019
    Posts:
    25
    No, that is not normal at all. One asset bundle with just a cube should build very quickly. What BuildAssetBundleOptions are you using? Also check if the BuildTarget you are passing into that method matches what you currently have set as active in your project. You said you have a large project and if you don't have fast asset switching in 2019+ it can take a very long time to switch build targets. I'm wondering if a platform switch is happening first, causing all the extra time.