- Home /
WebGL Build Shows Black Screen
I have a game that includes an asset from the asset store, a Canvas UI and a coin asset. I am developing on a MacBook pro. I have Unity 2019.2.16f.
When I play in the editor everything is fine.
If I build for WebGL nothing shows up. It is just a black screen.
How do I go about figuring this out?
I get one error when I build that says there isn't an event system, but there is one in the scene.
Here is what it looks like when running in the editor:
The colored lines around the edges are a world space Canvas based GUI. So is the gray rectangle in the middle.
I also tried building it for macOS and it has some of the elements of the teeth guys, but most of them are just gone.
How do I figure out what is going wrong?
I have been running it in Chrome on my $$anonymous$$acBook and that gives the black screen.
If I run it in Safari then the screen is all pink. Obviously something is wrong with a shader somewhere, but how do I figure it out when it runs fine in the editor?
Do you have the error log for the build when it's running?
There are no errors when I build.
I just created a brand new scene and changed nothing in it.
I then build for Webgl and run it and I get the splash screen from Unity and then a black screen in Chrome.
When I run the same thing in Safari I get a pink screen.
I just created a brand new project, changed the build type to WebGL and built it. I get 47 build errors. I did not add anything at all or change any settings. Just created the project (as a regular 3D project).
Is it safe to upload a Editor.log file to this forum? Is there any information in the log that would compromise my security?
By the way, I did not mean errors during building -- though that's very helpful too -- but errors when running the build. As far as posting here, you best check the file yourself and see if there's anything you don't want the world to see (like specific long file paths).
No errors while running.
I kind of figured out the problem. Will post my answer....
Answer by Hotshot10101 · Feb 21, 2020 at 03:01 PM
Well, I am not sure what is wrong with my 2019.2.16f installation, but something isn't right.
I decided to download and install 2019.3.3f and see what it would do. Everything works just fine. There must be something corrupted in my other installation of Unity.
So this is no problem at all in my project.