greggman / better-unity-webgl-template

A better default template for Unity WebGL
https://greggman.github.io/better-unity-webgl-template/
Creative Commons Zero v1.0 Universal
753 stars 136 forks source link

Compilation error on Unity 2020.1.8f1 #14

Open fkorsa opened 3 years ago

fkorsa commented 3 years ago

Hi,

Building for WebGL with the better template 2020 does not compile. The error is that HIDE_FULL_SCREEN_BUTTON is not defined.

Thanks for a very cool template!

greggman commented 3 years ago

I'm not sure how to help. I just tried it and it worked for me. Any ideas how I can repo the issue?

Here's a screenshot just loading the project in this repo, then build and run webgl

eD5ZThjwVy

You can see it's unity 2020.1.8f1, there are no errors in the build, the webgl build is running and there are no errors in the browser.

Then I set hide full screen button to 1

MKb6T8lQyU

and that worked too, no errors, fullscreen button is gone.

Any ideas how I can repo your issue?

fkorsa commented 3 years ago

I just noticed in Git after closing Unity that my project settings were modified, the HIDE_FULL_SCREEN_BUTTON variable was somehow added to the settings. After starting Unity again the issue does not show anymore.

I'm guessing that variable was not yet added when I tried to build - I'm not sure what added it actually. Do you know?

In any case, we can also just close this issue. It's likely actually a bug in Unity itself.

Thanks for your help and time!

tomaszwozniak123 commented 1 year ago

Found solution: you need to go to Player settings, and manually select template again.