Scene, Lightmap and AssetBundle

Hello there.

I’m trying to do something really simple :

  • Add a bundle tag to a scene
  • Bake the scene lights
  • Pack the bundle containing the scene (and only the scene) with the AssetBundleBrowser
  • Load the scene at runtime

Everything is working smoothly. My scene is even loading. However while loading it’s triggering errors :

Failed opening GI file at relative path: 'e8/e8285ee09500dd75eb204e5f2853b59b.rpc.sse'. Absolute path: 'archive:/BuildPlayer-CampMap-DefaultCamp/Lightmaps/e8/e8285ee09500dd75eb204e5f2853b59b.rpc.sse'.

Failed loading Enlighten probe set data for hash: 0xe8285ee09500dd75eb204e5f2853b59b

Error adding Enlighten probeset e8285ee09500dd75eb204e5f2853b59b: Data not available.

The ASsetBundleBrowser shows that the data should be within the bundle.

Using 2017.3

As this is quite urgent, I’m going as far as pinging @Ryanc_unity

Ok, it seems it’s working fine on WindowsStandalone mode in the editor, but not in Android mode

Hmm, well just from the initial look everything should work correctly. Hmm, so first thing I would suggest is to run
<Unity_Install_Path>\Editor\Data\Tools\WebExtract.exe on the bundle in question to see the contents. Then see if that file actually exists in path stated in the error: <extracted_path>/Lightmaps/e8/e8285ee09500dd75eb204e5f2853b59b.rpc.sse

If that is the case, then it’s possible something is wrong with the loading code. Can you post your loading code snippet?

Thank you so much for answering.

Well, after discovering it was working well with the StandaloneWindows platform in the editor I went ahead and build the project for windows and android :

  • Editor StandaloneWindows => working fine
  • StandaloneWindows player => working fine
  • Editor Android => the error mentionned above
  • Android player => working fine

The bundles are the same for the editor and the player for each platform.

I unpacked the Android bundle as you asked (thanks for the tips btw, this is a really nice tool) and there is no e8/e8285ee09500dd75eb204e5f2853b59b.rpc.sse file, only a e8285ee09500dd75eb204e5f2853b59b.rpc.neo one.

So in Editor+Android it seems to expect a .sse file, while the bundle contains a .neo one. But it works fine after building the apk

Ah ok, so that is one of the general issues when working with asset bundles as they contain platform specific data that is not 100% compatible with the editor as the editor is just simulating the platform, but it’s still just running on Windows. Though in this case it’s reading lightmap data and it should have a list of which files it needs to load from the scene being loaded from the same bundle. So it seems a bit odd this would ask for a different file. Can you submit a fogbug with your repro information for us to dig into and see if it’s something we can fix and make work cleaner?

Hi,

Thanks for your answer.

Sadly I don’t really have time to set-up a reproducible case right now. I’m not doing anything special however :

  • Create a scene
  • Generate lightmap
  • Put an assetbundle name on the scene
  • Use the assetbundle browser to pack my bundles
  • Load the bundle at runtime

I seem to be alone in that case ?

Hi,
In my case, it also happens the same.
@RDeluxe Did you got any solution?

I have went through I feel every thread on google on this topic and there is no answer. Are we just out of luck on using baked lighting with asset bundles?

Hello,

There were 2 problems for me there. The first one was that I was using android asset bundles in the editor, hence the shader / material problems. This one is “normal”.

However in Build I still have issues with my lightmaps. After disabling “automatic” shader stripping in the Graphics settings my lightmaps are partially working now.