Search Unity

Occlusion With Scenes In AssetBundles

Discussion in 'Editor & General Support' started by spectre1989, Feb 22, 2013.

  1. spectre1989

    spectre1989

    Joined:
    Oct 6, 2009
    Posts:
    125
    Hi everyone,

    In our game we want to take each of the zones in our game, and make a scene for each one with occlusion data baked for all the static objects. This scene is then put in an asset bundle and loaded dynamically at run time. Occlusion doesn't seem to be working when I do this, is this just not possible with a scene loaded from an asset bundle? It would be nice for the artists to be able to make changes to zones and build a new bundle, rather than then having to build the entire game every time.

    Thanks for any help
    Joe
     
    T_Isa likes this.
  2. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    There is no limitation related to scenes from asset bundles.

    There is another limitation though that you are pretty surely hit by: Occlusion Culling is limited to scenes you load with 'Load' or 'LoadAsync'
    You can not use LoadAdditive or LoadAdditiveAsync, because the occlusion data can not be merged. As such if you use Loadadditive in any form, the occlusion data for the new scene must already be baked into the original one or it will not work.

    This also means that you can not create large continous worlds with occlusion data as its nearly granted that you will never be able to bake the occlusion data for the original scene
     
  3. spectre1989

    spectre1989

    Joined:
    Oct 6, 2009
    Posts:
    125
    Unity... Oh Unity... *Facepalm*

    Well, thanks for letting me know, the official documentation doesn't seem to mention this anywhere.