Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

lightmapped scene loaded from asstbundles messed up

Discussion in 'Editor & General Support' started by Daylightsburning, Jul 4, 2014.

  1. Daylightsburning

    Daylightsburning

    Joined:
    Oct 24, 2013
    Posts:
    15
    Hi everyone,

    I have a scene which is lightmapped with beast, it's all fine if load with Resources.load (local resource), then i find the lightmap will mess up if load from assetbundles. i checked the loaded model's lightmapIndex and lightmapTilingOffset, they are identical, then i checked the lightmap itself, the lightmaps are also fine (looks identical both loaded from assetbundle and from resource folder, at this point, there are no more things i can do to spot the problem.

    the lightmap itself is in an assetbundle (single file assetbundle), the scene (prefab, single file assetbundle too).

    loading process is extract the lightmap and set it to global lightmapSettings, then load the scene

    Anyone please help, this must be solved as soon as possible, thank you.
     
  2. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    I found that modifying the global lightmap settings code can be really touchy. A lot of the structures are references so it's easy to modify a hidden copy and not actually modify the real structure. I'd suggest double checking your code to make sure that the global lightmaps structure actually contains the data you think it does after you set it up. I definitely had that issue in my initial implementation of SECTR STREAM.