Search Unity

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:
    738
    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:
    738
    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,080
    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:
    738
    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.