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 No skybox light in editor after teleporting between scenes

Discussion in 'Editor & General Support' started by Byproduct, Mar 9, 2023.

  1. Byproduct

    Byproduct

    Joined:
    Sep 3, 2021
    Posts:
    7
    Hello!

    In my game, the player can enter a teleport which loads the next scene, using
    SceneManager.LoadScene("scene name", LoadSceneMode.Single) . Standard stuff.

    The next scene is lit only by the Skybox and doesn't need any other lights.

    This works perfectly fine in the compiled game, and it also works fine if I just manually load and unload the scenes in the editor. However, when the editor is in play mode and I use the in-game teleport, in that case the next scene is completely unlit in the editor. I see the skybox but all the objects are completely black.

    In the window->rendering->lighting->environment menu the scene seems to change appropriately, the skybox material is the correct one, but the scene is all black nevertheless and the sliders do nothing (unless I load and unload the scenes manually).

    I wonder if I'm missing some editor setting that could make this work normally? Would help testing if I could teleport between scenes as intended in the game.

    Cheers!
     

    Attached Files:

  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,517
  3. Byproduct

    Byproduct

    Joined:
    Sep 3, 2021
    Posts:
    7
    I have only the skybox light in that scene, so there's nothing to bake. Even the auto-generate options are greyed out (if I understood correctly that it's the same as auto-baking).

    But if it's a bug that can't be helped, that's no problem, at least I know and can stop trying to fix it. :)
     
  4. TimRad96

    TimRad96

    Joined:
    Jan 3, 2022
    Posts:
    3
    This is too accurate lol
    Same problem here

    I fixed it by adding a Lighting Settings Asset to all the scenes even though I wasn't using any light sources. It just fixed it for me.