Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Bug Additive scene is darker on build.

Discussion in 'Global Illumination' started by Gekigengar, Mar 19, 2023.

  1. Gekigengar

    Gekigengar

    Joined:
    Jan 20, 2013
    Posts:
    691
    1. Lighting Setting is the same on both scene.
    2. Bake Only. (All lighting is set to baked, both directional & point)
    3. LoadSceneAdditive(additiveScene, LoadSceneMode.Additive)
    4. SetActiveScene(additiveScene)

    I also confirmed that both scene is the same.
    And its in build.
    Code (CSharp):
    1. var activeScene = SceneManager.GetActiveScene();
    2. Debug.LogError($"{activeScene.name}({activeScene.buildIndex}) : {sceneName}({(int)sceneName})");


    Need help resolving this issue, it works perfectly fine in the Editor.

    Thanks!
     
    Last edited: Mar 19, 2023
  2. Gekigengar

    Gekigengar

    Joined:
    Jan 20, 2013
    Posts:
    691
    I've resolved the issue, turning on SSAO in Renderer Feature fixed it on build. Probably have something to do with shader stripping, but this is definitely a bug?
     
  3. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,079
    Chances are that it's related to SkyManager. For more info, check out this chapter in the troubleshooting guide:
    It's strange that the issue resolved itself by enabling SSAO, though...
     
  4. Gekigengar

    Gekigengar

    Joined:
    Jan 20, 2013
    Posts:
    691
    A lot of the posts about lighting in build points out to shader stripping, see the posts after this one: https://forum.unity.com/threads/turn-urp-ssao-on-and-off-at-runtime.1066961/#post-8183144

    Someone sent a bug report, but that's on March 17, which probably will arrive to the GI team on June or more.