playMaker

Author Topic: Swapping Scene Lightmap Bakes At Runtime? (Day/Night)  (Read 3481 times)

westingtyler

  • Sr. Member
  • ****
  • Posts: 277
    • My Video Game Projects Web Site
Swapping Scene Lightmap Bakes At Runtime? (Day/Night)
« on: May 16, 2018, 08:02:15 PM »
If I bake my scene using two different lightmap setups, as two different light map sets (not even sure if that's possible?) it'd be great to be able to load the different lightmap sets into an array as prefabs or something, then switch between them at runtime, like to switch between day and nighttime lighting in the city.

Is that possible?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7620
    • jinxtergames
Re: Swapping Scene Lightmap Bakes At Runtime? (Day/Night)
« Reply #1 on: May 17, 2018, 03:47:53 AM »
Hi.
i believe that Unity stores lightmaps per-scene.

So you might want to duplicate the scene and make a light map for each.

If you use load scene async you could split things up so that you only need to load parts of the scene (where lightmap is used)

Maybe this can get you in the right direction :


westingtyler

  • Sr. Member
  • ****
  • Posts: 277
    • My Video Game Projects Web Site
Re: Swapping Scene Lightmap Bakes At Runtime? (Day/Night)
« Reply #2 on: May 22, 2018, 06:15:27 PM »
hey, thanks for the info. i don't see anything after the :. it looks like some invisible square if I control+drag over it?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7620
    • jinxtergames
Re: Swapping Scene Lightmap Bakes At Runtime? (Day/Night)
« Reply #3 on: May 23, 2018, 08:45:59 PM »
Hi.
For some reason you are not seeing the youtube video.

Here is the direct link :