Search Unity

  1. The 2022.1 beta is now available for testing. To find out what's new, have a look at our 2022.1 beta blog post.
    Dismiss Notice

Building Global Illumination data in Asset Bundle

Discussion in 'Global Illumination' started by maxxa05, Sep 28, 2016.

  1. maxxa05

    maxxa05

    Joined:
    Nov 17, 2012
    Posts:
    161
    So, I need all my enlighten data to be built in an Asset Bundle so it is not built with the game. Basically, when we build the GI data in a PS4 package, for some reason it takes forever to build (like, more than 24 hours).

    We have a multiple scene setup. When we bake the lighting data, it gets saved in the currently active scene. We tried the following:
    1. Bake the data for all the scenes while having an empty scene as "Active".
    2. Set this scene to be built in an Asset Bundle in the editor.
    3. Build the Asset Bundle and put it in StreamingAssets.
    4. Build the game (without including the Asset Bundle scene with baked data).
    5. In the built game, load the scene from the Asset Bundle before loading scenes with baked lighting.
    It seemed to work, until I tried to make a PS4 package, which is taking forever to build. It seems like even if the data is in the Asset Bundle, Unity still builds it in the player. I guess that since baked scenes reference the data, Unity builds it while ignoring the Asset Bundle flag on the scene containing the data.

    Is there any way around this? Since the GI data itself is an Editor only file, it can't be included in a Bundle. I'm a bit lost here.

    Thanks!
     
    alexandre-fiset and sonofbryce like this.
unityunity