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

Question Setting Environment Lighting and Reflections at runtime ?

Discussion in 'Universal Render Pipeline' started by petey, Aug 20, 2021.

  1. petey

    petey

    Joined:
    May 20, 2009
    Posts:
    1,817
    Hi there,

    I've have a simple master scene and I'm loading extra scenes in after, if I set the second scene as active the Environment Lighting and Reflection lighting seem to revert to Default.
    Just wondering how can I control this stuff manually at runtime?

    Aug-20-2021 11-30-41.gif
    When the second scene becomes active the environment settings reset.


    Screen Shot 2021-08-20 at 11.38.35 am.png
    Can I set these at runtime?

    I'm running Unity 2020.3.15f

    Thanks!
    Pete
     
  2. Kichang-Kim

    Kichang-Kim

    Joined:
    Oct 19, 2010
    Posts:
    1,008
    You should bake the LightingData for environment lighting even though you does not use Lightmapping.
     
    admin_unity602 likes this.
  3. petey

    petey

    Joined:
    May 20, 2009
    Posts:
    1,817
    Awesome! Thank you @Kichang-Kim :)
    I didn't realise you had to bake that information in.
     
  4. Xtro

    Xtro

    Joined:
    Apr 17, 2013
    Posts:
    604