Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Build loads into black screen on Itch.io or github pages, but works from 'Build and Run'

Discussion in 'WebGL' started by Chimpien, Aug 11, 2021.

  1. Chimpien

    Chimpien

    Joined:
    Nov 8, 2018
    Posts:
    8
    I have a simple WebGL build that suddenly stopped working, after only some small cosmetic changes to the scene. The project works fine in Unity, and builds without errors, when it comes up in Chrome from 'Build and Run' it works fine. However, when I try to upload to Itch.io or github pages it loads without issue, but then displays a black screen and I can't figure out why. The dev tools report some ignored ontrigger messages when there are no colliders in the scene, and some other warnings relating to sharedarraybuffer and gamepad, but nothing that suggests there are any actual problems. I have tried various publishing settings: with and without compression, with and without decompression fallback. All graphics settings are set to default, and using default shaders. There is only one scene, and I've not changed its name, I tried removing it from the build and readding it. Unity version 2020.2.3f1.

    Link to it on itch.io:
    https://chimpien.itch.io/test2

    github link of the project:
    https://github.com/PaulBremner/JoeAbstract
     
  2. KamilCSPS

    KamilCSPS

    Joined:
    May 21, 2020
    Posts:
    386
    Do you have the previous, working, build? Did you change Unity's version between build?

    Nothing sticks out of the ordinary on first glance. Does it work on github-pages with compression off? Did you enable full stacktrace exceptions to see if there's any errors thrown?
     
  3. Chimpien

    Chimpien

    Joined:
    Nov 8, 2018
    Posts:
    8
    I tried with full stack trace and nothing additional gets flagged in the console.

    I have not changed Unity version between builds (though I'm going to try on the latest version of Unity, once it installs, as I've no other ideas).

    Unfortunately I don't have the old working project, only the build files. I'm 99% sure all I changed was disabling of some UI elements, can't see why that would break things. If it wasn't working in Unity I'd have something to work from, it not working once built makes no sense to me.
     
  4. KamilCSPS

    KamilCSPS

    Joined:
    May 21, 2020
    Posts:
    386
    So when you upload the 'old' build files it works fine?
     
  5. Chimpien

    Chimpien

    Joined:
    Nov 8, 2018
    Posts:
    8
    Yes, that still works fine.

    https://paulbremner.github.io/testUnityApp/

    I have tried reverting the changes I made, and moving the project to the latest Unity version, to no avail.
     
  6. KamilCSPS

    KamilCSPS

    Joined:
    May 21, 2020
    Posts:
    386
    Maybe some weird issue / corruption with the cache in the library folder.

    Close the editor, backup your project. Delete the library folder, open the project again and let Unity rebuild the library files.

    If still not working, next 2 steps:
    1. Delete & test, delete & test until you find a culprit. Revert all project settings to defaults too.
    2. Finally, if still no-dice, I would make an "empty" Unity project, that properly builds, and transfer everything over.

    It's really weird, no doubt... but I don't know how to help you otherwise. Please reply if you find the culprit and report it as a bug.