Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

How to store Enlighten DynamicGI data in asset bundles

Discussion in 'Unity 5 Pre-order Beta' started by kopysov, Dec 9, 2014.

  1. kopysov

    kopysov

    Joined:
    Oct 19, 2014
    Posts:
    1
    All our assets are placed in asset bundles, it is useful for us because we can load data step by step and show game to user earlier.
    Will it be possible to store Enlighten data in bundle and then load it in game dynamically?
     
  2. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    Hi kopysov, yes it will be possible. It is a known issue that it doesn't work right now and we will fix this (fogzbugs id 648609).
     
    ronjart and Roni92 like this.
  3. ronjart

    ronjart

    Joined:
    May 16, 2013
    Posts:
    101
    Has this since been implemented? Any ETA?
     
  4. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    No, I can't promise which specific beta version will contain it yet.
     
  5. ronjart

    ronjart

    Joined:
    May 16, 2013
    Posts:
    101
    Looks like this feature has been implemented as of RC1!

    Now, I'm struggling to figure out how to handle the Enlighten data. Where is it stored? How do I create a Asset Bundle from it. I found a "Lightmap Snapshot" file, but I can't build an asset bundle from it ( I get an "Editor Object" error). I've tried to use Google and the forums, but with no luck. Any help is appreciated.
     
  6. bsterling250DI

    bsterling250DI

    Joined:
    Sep 25, 2014
    Posts:
    78
    i assume it would be included in the scene bundle
     
  7. ronjart

    ronjart

    Joined:
    May 16, 2013
    Posts:
    101
    That seems to be the way to go! However, I do get an error once I load the scene via asset bundles:

    Failed opening GI file: '1f/1f5d62da6476019d18daec406fb2f035.iws.sse'.
    (Filename: C:/buildslave/unity/build/Runtime/GI/HashFile.cpp Line: 168)
    Failed opening GI file: '1f/1f5d62da6476019d18daec406fb2f035.vis'.
    (Filename: C:/buildslave/unity/build/Runtime/GI/HashFile.cpp Line: 168)
    Failed opening GI file: '1f/1f5d62da6476019d18daec406fb2f035.rsc.sse'.
    (Filename: C:/buildslave/unity/build/Runtime/GI/HashFile.cpp Line: 168)
    Failed opening GI file: '1f/1f5d62da6476019d18daec406fb2f035.taw'.
    (Filename: C:/buildslave/unity/build/Runtime/GI/HashFile.cpp Line: 168)
    Failed loading system data for hash: 0x1f5d62da6476019d18daec406fb2f035
    (Filename: C:/buildslave/unity/build/Runtime/GI/Enlighten/EnlightenRuntimeManager.cpp Line: 1712)
    Do I need to manually setup the GI references or something like that?
     
  8. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    Building a scene asset bundle should automatically include the GI data since RC1.
     
  9. ronjart

    ronjart

    Joined:
    May 16, 2013
    Posts:
    101
    I'm running RC1 and it looks like the GI data is stored in my scene asset bundle (looking at file-size). But when I load the bundle and load the scene (Application.LoadLevel), Unity loads the scene contents but not the GI and I get the above error.

    Do I need to unpack or instantiate the lighting data in any way? Thank you for your help. I think you guys are doing a fantastic job with the new lighting system and Unity 5 in general.
     
  10. ronjart

    ronjart

    Joined:
    May 16, 2013
    Posts:
    101
    If I run in the Editor, I get this lovely error:



    I can load Scene asset bundles with no issue, this only happens when I package the scene asset bundle with lighting data. Was anybody else successful loading Enlighten data from asset bundles?
     
  11. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    We have reproduced some issues here with asset bundles in the editor. It should work in RC1 in the standalone player. We hope to fix asset bundles with enlighten data in the editor in RC3.
     
  12. ronjart

    ronjart

    Joined:
    May 16, 2013
    Posts:
    101
    Good to hear. FYI, the first error log I've posted was from a standalone build on Windows (not in the editor).
     
  13. ronjart

    ronjart

    Joined:
    May 16, 2013
    Posts:
    101
    I got a similar error when loading an asset bundle scene without GI data. It looks like this error might not be related to asset bundles since the file that is referenced in the error is a prefab I'm trying to instantiate. Just thought this might relate to the asset bundle errors.



    This only occurs in the editor, the build works fine.
     
  14. ronjart

    ronjart

    Joined:
    May 16, 2013
    Posts:
    101
    Was this bug addressed? As of RC3 I'm still getting the same/similar errors.
     
  15. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    We adressed the asset bundle issues. If there is another bug, then please file a bug report with repro project.

    If you post the case number here that will be appre
     
  16. ronjart

    ronjart

    Joined:
    May 16, 2013
    Posts:
    101
    I resolved some issue I had with loading my asset bundle and it seems to be working at last!
     
  17. ronjart

    ronjart

    Joined:
    May 16, 2013
    Posts:
    101
    It looks like the errors posted above were cause by loading an assetbundle (specifically the enlighten data) from cache. Loading the same bundle from the web resolved all my issues. I just filed a bug report: 676721_dujd3ouspjmou32m