Search Unity

App Works in Editor, but blank screen when built

Discussion in 'Getting Started' started by batvink, Oct 1, 2019.

  1. batvink

    batvink

    Joined:
    Sep 26, 2019
    Posts:
    61
    Hi,

    Looking for help in the early stages of my Unity development life.

    I am unable to get my app running, I just get a blank screen after the loading bar has completed. Tested in WebGL (Chrome and Edge), Android and Standalone PC. I'm hoping I missed something fundamental.

    In the Unity IDE, it runs fine. (2019.2.4f1). I am using ShareMyGame.com to test the WebGL, so that I am confident that the platform supports WebGL. Another tutorial game I uploaded works fine.

    https://www.sharemygame.com/share/36d01217-ef1c-45ce-a98a-02c3068852f8 (Available until 26/09/2019)

    I call it an app rather than a game, as it is a simple interface with 5 buttons, a text edit box, and a dynamic list of buttons in a scroll rect. Clicking the buttons starts and stops a timer and saves the times to a List<>.



    I have checked the console and there are no error messages. I do not know how to trace potential issues any other way.

    I added Debug.Log messages to Awake() and Start() attached to the main camera, and these are not output in the console; no code is running.

    (This issue started as a post here, when I thought it was only WebGL)
     
  2. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,147
    JeffDUnity3D likes this.
  3. batvink

    batvink

    Joined:
    Sep 26, 2019
    Posts:
    61
    Thanks for the reply, I just came to the same conclusion a couple of hours ago, after 3 days of racking my brains. And you are absolutely correct!

    The mistake I made was renaming the default scene (there is only one scene) by saving it as a different name. But of course at this stage, the Build Settings have already been set up with the original scene. I even remember thinking it will be fine to not delete the original scene from disk, it's only a small file.

    The final clue that lead me to the answer was when I saw the IDE clear my scene structure as it built (I now know it was loading "SampleScene"). At this point, I changed the background colour of the camera from the default blue to green, and found that when I built the project, the background was still blue...in the words of Obi Wan, this is not the scene you are looking for.

    Thanks again for looking at my issue.