Search Unity

Lighting is not working after building for PC.

Discussion in 'Editor & General Support' started by S7309, May 29, 2021.

  1. S7309

    S7309

    Joined:
    Feb 21, 2018
    Posts:
    3
    I've been developing a first-person shooter in which I've used multiple light sources (Point, Spot) and directional light. In the editor, the game is working as intended but in PC build lights were not working (whether it's directional or Point/Spot) as if all the lights were automatically disabled.

    The first image is from PC build and the second image is from Editor.



     
  2. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,409
    editor and build might have different quality settings?
     
  3. S7309

    S7309

    Joined:
    Feb 21, 2018
    Posts:
    3
    both have the same "High Quality" settings.
     
  4. dgaban

    dgaban

    Joined:
    Jan 17, 2018
    Posts:
    6
    I have this same issue. No one knows what the solution is???
     
  5. arkano22

    arkano22

    Joined:
    Sep 20, 2012
    Posts:
    1,924
    You gave basically zero info on your lighting/rendering setup, no one is going be able to help you unless you give some more info like: render pipeline being used? are these lights realtime only, baked or mixed? lighting settings? shader(s) in use by lit objects? etc.
     
  6. dgaban

    dgaban

    Joined:
    Jan 17, 2018
    Posts:
    6
    That's because you would think Unity would be smart enough to have the editor settings translate into a build but nope. It is absolutely mindnumbingly stupid that lighting in editor play mode would be different than in the build.
     
  7. arkano22

    arkano22

    Joined:
    Sep 20, 2012
    Posts:
    1,924
    Translating editor settings into the build just isn't possible 99% of the time, because the platform/device combination you're using the editor in usually isn't the one you're building for. How would you translate settings/lighting used in a i9/3090 RTX desktop to an Android phone?

    Even though there's some common build settings, there's separate build settings for each platform, as well as graphics quality settings.
     
    Last edited: Jun 1, 2022