Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

No shadows in build

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

  1. Leebrahop


    Apr 22, 2020
    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


    Sep 21, 2017
    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 :/