Search Unity

Bug Artifacts when loading a scene

Discussion in 'Scripting' started by ProGameDevUser, Nov 26, 2022.

  1. ProGameDevUser

    ProGameDevUser

    Joined:
    Mar 17, 2018
    Posts:
    115
    Hello everybody! Faced with such a problem, when loading scenes, such a thing happens, there is no such thing on PC and Android, there is on iOS systems and that just did not try, nothing helps, help pliz
    I use the standard SceneManager.LoadScene and also tried Async Load Scene, tried to skip the frame or for a while before loading the scene, but nothing helps
    Bug video:
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,689
    Most likely you have one (or more) frames with zero cameras.

    To verify, in the Unity editor run it one frame at a time (step with the >| button)

    Solution: always have at least a single full-screen Camera clearing to black.
     
  3. ProGameDevUser

    ProGameDevUser

    Joined:
    Mar 17, 2018
    Posts:
    115
    Hi! Thanks for the answer! I tried to view the moment of transition to the menu frame by frame, but there is no such moment on the PC, i.e. you suggest increasing the priority of the camera in the menu, did I understand correctly?)
     
  4. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,689
    I'm saying that I have seen similar glitches when I had one or two frames of no-camera and no-full-screen clear UI image object.

    One easy way to possibly see is to put a
    Debug.Break()
    on your BACK button, and then step one frame at a time in the editor to make sure each frame has full screen image or camera.
     
  5. ProGameDevUser

    ProGameDevUser

    Joined:
    Mar 17, 2018
    Posts:
    115
    I checked frame by frame using Debug.Break() the whole process and yet there is no moment when the camera is not on stage...
     
  6. ProGameDevUser

    ProGameDevUser

    Joined:
    Mar 17, 2018
    Posts:
    115
    I am happy to announce that I fixed this problem :))) In the URP, this is caused by the camera settings, I had unitialized installed and that's what caused the lack of artfects, I made solid color and everything worked, it would probably work with SkyBox too, thanks for the answers!!!
     

    Attached Files:

    • 515.png
      515.png
      File size:
      11.2 KB
      Views:
      76