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

What is Preview Scene and wth is Unity trying to unload it

Discussion in 'Editor & General Support' started by snacktime, Jan 23, 2018.

  1. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    I am sporadically getting calls to SceneManager.sceneUnloaded with a scene by the name of 'Preview Scene'. Which exists nowhere in my project. Interesting note is zooming the camera in and out a significant distance, or switching between scene and game view, both appear to have a high chance of triggering this.

    Not a big deal now, once I figured out what the hell was triggering my unload logic that destroys a bunch of objects.
     
  2. Dave-Carlile

    Dave-Carlile

    Joined:
    Sep 16, 2012
    Posts:
    967
    EditorSceneManager has methods for creating and closing "Preview Scenes". At this point I have no idea what they are, though. You might look for calls that do that, maybe something from a store asset?
     
  3. Mamoon178

    Mamoon178

    Joined:
    Jul 26, 2017
    Posts:
    36
    delete your scene from build setting and add again. this is not any bug of unity
     
    skykapok likes this.
  4. Expertcow

    Expertcow

    Joined:
    Apr 24, 2021
    Posts:
    3
    the preview scenes are things that get created when you select a dropdown box. I would assume that they are created to simulate each of the options in said dropdown box. having too many preview scenes will make performance issues, which is why Unity is trying to delete them