Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Bug Lighting issue in 2019.4.21f1 LTS and 2019.4.23f1 LTS

Discussion in 'Editor & General Support' started by Erenquin, May 14, 2021.

  1. Erenquin

    Erenquin

    Joined:
    Apr 9, 2018
    Posts:
    164
    It is relatively similar to this issue:
    https://forum.unity.com/threads/the-unity-2020-2-4-this-version-has-a-problem-with-lighting.1057640/
    And described here:
    https://forum.unity.com/threads/weird-lighting-glitch.812943/#post-7138841

    When I open Unity and start the game the very first time the scene is wrongly lit.
    When I reload the scene via script, the lighting is back to normal.
    If I stop / restart the play, it is back to wrong lighting.
    This also occurs in the build

    This issue started to occur 2019.4.21f1 (LTS) and is present in 2019.4.23f1 (LTS) as well.
    I reverted back to 2019.4.19f1 (LTS).

    1st picture is lighting in 2019.4.19f1 LTS and after scene reload via script (in 21f1 and 23f1).
    2nd picture is lighting in 21f1 and 23f1 at load time and very 1st run.

    upload_2021-5-14_16-38-14.png upload_2021-5-14_16-39-25.png

    As a side note, seeing that even LTS versions are so much bugged is extremely sad.
    Yes bug are there in every software, but something so obvious in subsequent versions, no.
     
  2. linenum

    linenum

    Joined:
    Nov 16, 2020
    Posts:
    58
    There is a thread from 2018 about what I think is the same problem:
    https://forum.unity.com/threads/solved-scenemanager-loadscene-make-the-scene-darker-a-bug.542440/
    In Unity 2020.3.8f1 (which also has that problem) this work-around is working for me:

    Go to Window>Rendering> Lighting >Environment

    In Environment Lighting set Intensity Multiplier to 0

    In Environment Reflections set Intensity Multiplier to 0

    Here is a method for testing for the bug:

    I attached the code to a Cube and when I press the key (space) the cube goes darker. The hierarchy is also collapsed.

    Code (CSharp):
    1. using UnityEngine;
    2. using UnityEngine.SceneManagement;
    3. public class TestSceneScript : MonoBehaviour
    4. {
    5.     void Update ()
    6.     {
    7.         if (Input.GetKey(KeyCode.Space)) // Any key you wish
    8.         {
    9.             Debug.Log("reloaded");
    10.             SceneManager.LoadScene(SceneManager.GetActiveScene().name);
    11.         }
    12.     }
    13. }
     
    Last edited: May 17, 2021
  3. Erenquin

    Erenquin

    Joined:
    Apr 9, 2018
    Posts:
    164
    Hello,
    I'm a bit late.

    I applied a workaround I found in another thread: disabling the skybox. I set it to none.

    You example is exactly wath I mean: lighting is different when loading a scene in Unity (and starting the play mode) than when loading the scene via script.