- Home /
Black screen on build run.
Hello everyone. Hope the unity community can shed some light on this.
I'm trying to build my game (a relatively big project) and I'm having problems. The game runs fine in the Unity Editor but upon running the builded .exe it just shows a black screen.
I tried removing everything except from the main menu UI, I tried building just a test scene, nothing works. The build always runs as a black screen.
The problem is present only since today, and I can't seem to understand what caused it.
Has anybody had this kind of problem?
You've tried a test scene? So it's nothing related to your project. Have you ever successfully run a build?
Answer by ClaudioFreda · Jun 21, 2014 at 06:14 PM
Yep, that was already checked.
I spent almost 5 hours on this bug, and I finally discovered what it was.
Apparently, if you have only one camera set up as "don't clear" in the scene, the editor will give you no problem but the built executable will not show anything at all. Weird.
Unity should at least give an error or something.
Hi, I've got this kind of problem as well. I don't quite understand what are you want to mean by setting camera up as "don't care" in the scene. Do you mean set the tag of the camera as untagged?
You have to change the "Clear flags" setting in the camera to "don't clear". After a recent update to Unity 2017.3.0 I had this problem in my app this solution worked for me! Thanks!
Ryan, this will (obviously) prevent the last frame from clearing, plus the background will start as black. $$anonymous$$ost people most likely don't want this behavior.
Answer by lukos · Jun 21, 2014 at 05:32 PM
Hi, might be a bit stupid question. Are you sure you are building correct scene? If yes are you sure correct scene is loaded first?
Thank you very much, this solved my problem. I will also add, if your building with S$$anonymous$$mVR, there are two cameras, change both to skybox as one is set to dont clear.
Every question is stupid for you if don't know about anything
Answer by weex- · Jun 24, 2021 at 11:15 AM
Same problem, as today, under 2020.1.2f12
Black screen into the game window, under play, and of course the build.
Any idea ? I'm not sure this forum as been refreshed about that question...
Take care everyone, i'm trying to find a solution.
weex
Answer by theforgot3n1 · Jul 03, 2021 at 03:43 PM
In my case I could temporarily fix the issue by somehow refreshing my screen (e.g. plugging in/out extended monitor).
However, the long term fix was realizing that one of my scripts was modifying my screen resolution too early (in awake) which caused something very similar to a black screen (with one visible line in the middle). So, for anyone with this issue you might want to double-check that you aren't modifying your screen resolution too early in the launch.
PS: It might not be the same black screen... but I'll still add this answer in case it helps someone.
Answer by unity_0AD426A006EE51C47EE8 · Sep 22, 2021 at 07:04 AM
Hi, All! First of all I'm new in here and want to discuss about unity issues and some other games issues during my game development and right now my game is stuck on black screen and it seems like my game is not loading while the game is running on unity editor but when I making a build for android and testing it in my phone then it shows me the black screen Can anyone solve this issue. Thank you!

Uncheck 'Optimized Frame Pacing' and 'Use 32-bit Display buffer'
Your answer