Search Unity

Running my Application changes the Lighting Settings

Discussion in 'Editor & General Support' started by unity_kO8A9KoHE9t7FA, Apr 10, 2021.

  1. unity_kO8A9KoHE9t7FA

    unity_kO8A9KoHE9t7FA

    Joined:
    Feb 22, 2021
    Posts:
    2
    Hello everyone I've stumble across quite an annoying issue and searching for a solution on Google and this forum didn't really help much. I have the following problem: As soon as I hit the play button my Lighting Settings get reset and changed.

    Here you can see my Lighting -> Environment Tab before I hit play
    befor.png
    And here after:
    after.png

    I already tried to restart Unity, update to the newest version, remove all baked data, clear my Unity cache, etc. so I am really frustrated. Because of that, I am not able to update my Skybox for example. Interesting thing is that I am able to change these settings once per scene it feels like. So if I want to change the skybox settings I'd had to create a new scene, take everything from this scene and put it there, and delete this scene. But this can't be the right workflow. So if there are any ideas out there I'd highly appreciate them.

    Best regards
    Dennis
     
  2. unity_kO8A9KoHE9t7FA

    unity_kO8A9KoHE9t7FA

    Joined:
    Feb 22, 2021
    Posts:
    2
    Am I allowed to bump this post, because it is kinda urge and the bug kinda rought
     
  3. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,744
    Lighting fails in the editor unless you pre-bake each scene. Auto-building of lights only works on the first scene in editor, and unfortunately that's been a long standing limitation of Unity they haven't addressed.

    Furthermore if you are additively loading scenes, which ever scene is currently set to be the active one is the one that lighting comes from. To test this, run your game, pause it, then try setting different scenes active manually to see lighting changes.
     
  4. MichaelEGA

    MichaelEGA

    Joined:
    Oct 11, 2019
    Posts:
    40
    I had this problem. My game loads in a separate scene to the menu and so the lighting resets. I can manually restore the lighting. But looks like I will need to set my lighting by script every time there's a scene change.
     
  5. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,744
    Only in the editor. Or simply bake your lights for editor work. I find in practice it is rarely a true showstopper, just a minor annoyance. In the build it works perfectly.