Problem when building

I’m having trouble trying to build my game, both in the standalone version and in the WebGL version.
The screens don’t go and there is only a canvas with the Quit Button in place of the Start, on the background and the music, nothing else appears.
My version of Unity is 2019.4.11f1.
My game is working normally only in the Unity game window.
I already tried to restart, Unity, delete the game library in the folder and change the emscripten.config, but it didn’t solve

Canvas can be hard to use, specially when using webGL, to fix this issue you’ll probably have to tweak a lot of numbers, I’ll give you a great way to prevent this kind of issues and how to solve your problem.

This is a workflow I designed to make my life easier when working on WebGL.

  1. Decide the resolution you want your game to be, not ratio, the resolution (16:9 is a ratio, 960x600 is a resolution)
  2. Create that new resolution in the resolutions menu.
  3. Your canvas will probably change the position of all your buttons, which is great, that’s exactly what you want.
  4. Reposition all your buttons to the desire order.
  5. Go to the Edit Menu - Project Settings.
  6. Select the player tab and set the target resolution, make it the same as the one you previously put in the resolutions menu.
  7. Now you can build without any issues.

You’ll probably just have to do the last two steps. Also keep in mind that depending n which platform you are uploading your game, you’ll probably have to set the resolution there.

Privacy & Terms