Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug Desktop Showing when Loading a New Scene in Build

Discussion in 'Editor & General Support' started by robert-nally, Oct 20, 2023.

  1. robert-nally

    robert-nally

    Joined:
    Mar 5, 2014
    Posts:
    75
    Hey Everyone,

    I'm running into an error / issue where the desktop shows for a couple frames on my game when loading a new scene. It only happens on the build and not in the editor.

    I'm on 2019.4.40 LTS.

    I tried loading scenes asynchronously and I implemented a loading screen thinking that might solve the issue, but I still see it happening.

    I'm not sure what could be causing the issue. Any suggestions?
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,292
    There's probably a few frames where you don't have a fullscreen camera clearing your video buffer.

    Pause and step frame by frame in the editor and you can see it.

    To pause under program control, just execute
    Debug.Break();
    at the same time you load the scene, then step-step-step ensuring there's an operating full-screen camera at every frame.
     
  3. robert-nally

    robert-nally

    Joined:
    Mar 5, 2014
    Posts:
    75
    Thanks for the heads up. Any idea on how to ensure I have a camera going at all times?

    I tried making a backup camera and throwing it in some scenes, but I'm still seeing the issue. I also had the camera as part of an instance so it should have been in every scene. The camera was just set to show a black background with a sort order of -100 so it would be behind my other cameras.