Search Unity

No shadows in build

Discussion in 'General Graphics' started by Leebrahop, May 21, 2020.

  1. Leebrahop

    Leebrahop

    Joined:
    Apr 22, 2020
    Posts:
    1
    I am new to Unity and I've been playing with the unity FPS microgame and I can see shadows being cast from the directional light and the shadows move with the light in the editor but when I build the game to an .exe I don't get any shadows just the light.

    I've tried getting rid of all my quality settings except for one with shadows enabled.
    I've tried generating lighting
    I've tried logging to a text file the chosen Quality settings and the QualitySettings.shadows and it's all set up as expected (shadows = all and the quality setting is the one I have selected in editor).

    I don't understand why shadows have no problem rendering in the editor but don't in the build.

    Anyone know what causes this?
     
  2. tomiknuutila

    tomiknuutila

    Joined:
    Sep 21, 2017
    Posts:
    1
    I have the same problem. The solution I am working on at the moment is to export all my scenes and reimport them to a new project. This seems to work, but causes a lot of issues, since there are things like .hlsl scripts and subgraphs which don't get exported / imported. Also issues with terrain material not exporting or importing correctly. I have been using Unity 2019.3.0f6 and URP 7.2.1 to build my project and considering now to update to URP 7.3, but after banging my head against the wall, Unity crashing and sometimes losing URP totally (it just disappears from the project and doesn't allow to select an URP profile or create a new one, even though I've removed it and reimported it via package manager many time) perhaps it would be wisest to stick with same versions for both :/
     
  3. patty_n

    patty_n

    Joined:
    Jul 11, 2021
    Posts:
    1
    I have this problem as well. Unity version info.
    Version: 2020.3.13f1.629 Personal
    Revision: 2020.3/staging 71691879b7f5
    Built: Sat, 12 Jun 2021 14:55:54 GMT
     
  4. taggardwarf

    taggardwarf

    Joined:
    Feb 18, 2018
    Posts:
    1
    Bump - I'm having the same problem with the Unity FPS microgame using version 2020.3.17f1.
     
  5. funkyCoty

    funkyCoty

    Joined:
    May 22, 2018
    Posts:
    727
    Same issue. No shadows in a URP build?
     
  6. copycats09

    copycats09

    Joined:
    Apr 7, 2015
    Posts:
    1
    My project had auto changed the quality settings to low...doh