- Home /
Why don't shadows appear in my built .exe? Unity 5
I am running Unity 5.
I am using a directional light with hard shadows enabled.
The shadows are real time and render just fine in Game View and when playing the game inside the editor.
However, when I build and run the .exe, the shadows are nowhere to be found.
I went to window and set my directional light as the sun, tried deleting my directional light and making another, and made sure my graphics settings had shadows on. I also checked my objects and yes, they are set to receive shadows.
Is this a Unity 5 bug? Is my file corrupted? I have no clue how to fix this issue.
Thank you for your time and help.
Further Information: I have tried playing the game on a variety of settings. $$anonymous$$aximum settings does not show the shadows.
Further Information: $$anonymous$$y computer has Nvidia GTX 770s in SLI. They are rendering the shadows inside game view, so I know my hardware is not the problem. I have a different level where the shadows are working just fine
I have tried building the file for PC 86 and PC 86_64. I have a 64 bit 86_64 PC but the shadows are not there in either
Further info: I have windows 8.1; I have read about issues
I had this same problem, i tried every possible thing. Did not work. After waiting a long time i ended up starting the project fresh and it worked. Thats more of a end solution though.
Answer by Panimu · Apr 03, 2020 at 10:17 AM
So I just had this problem on Unity 2019 and this was the first google result so let me note the answer for the issue here.
Under Build Settings, go into Player Settings, then into Quality. There is a grid at the top, click the arrow next to Default and change it from Fastest to something else (i.e. Fantastic).
You should probably aim to then have this selection available to the users in a menu, somewhere down the line.
This had me going crazy for an hour! Thanks for saving me lol
Answer by senzor · Apr 24, 2015 at 03:56 AM
FIXED! Okay, so I fixed the issue. It was a combination of a couple things. First I changed my single directional light to rendering mode: IMPORTANT. Then I changed the rendering on the camera I think to deferred rendering which fixed shadows on certain objects, but still not my player. The biggest fix was the shader on my objects. I was using pre made textures from a pack and after I changed the shader to a stock unity specular, it appears to be working when I build it. Thanks so much team
changing to default shader fixed it for me for a few hours, now it's broken again lol.
Answer by CoderVinod · May 12, 2018 at 07:55 AM
@senzor In my case, it was automatically changing quality settings from Fantastic to Fastest in build. So changed it again to Fantastic from script (Ex : QualitySettings.SetQualityLevel(5)). 5 is id for Fantastic.
Deleting all quality settings except Fantastic also resolves issue.
Answer by Antaguar · Oct 30, 2017 at 10:18 PM
In my case the solution was just to increase the rendering quality (drop down selevction when starting the .exe).
That is because the quality settings in your project disables the shadows on lower quality.
You can modify it so that in any quality setting, shadows are enabled.
Your answer
![](https://koobas.hobune.stream/wayback/20220613193822im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Shadows in Editor But Not in Build 2 Answers
No realtime shadows in webplayer build? 0 Answers
Huge unknown shadow in scene [android] 1 Answer
Distribute terrain in zones 3 Answers