Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Can autosaving the backup scene be disabled?

Discussion in 'Editor & General Support' started by Dreamwriter, Apr 25, 2017.

  1. Dreamwriter

    Dreamwriter

    Joined:
    Jul 22, 2011
    Posts:
    472
    When you press Play in the Unity Editor, the first thing it does is save a backup of the scene. This is useful when Unity crashes or your code sends Unity into an endless loop, but with very large, detailed scenes, it makes it take forever for Unity to start running the scene.

    So can this be temporarily disabled? It makes it very annoying when trying to tweak values, try running the game, tweak values, try running the game, etc.
     
  2. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    I think your assumption may be wrong.. Scene savingmay not be the reason its so slow.

    You can try to use the profiler (check "profile editor") to see what's taking so long.
     
  3. Dreamwriter

    Dreamwriter

    Joined:
    Jul 22, 2011
    Posts:
    472
    You may be right, I never noticed that "Profile Editor" option. After we hit Play it takes roughly 12-15 seconds for our game to get going, according to the profiler 10 seconds of that is in "EnterPlaymode". Half of that is in Application.WaitForAsyncOperationToComplete, being called twice, with most of the time taken up in LoadLevelAsync Integrate (which is then using most of its time in OnPostProcessScene and MergePrefabs).
     
  4. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    Try to run profiling in "deep profiling" mode. it should give you a better indication to what's going on.

    If it pauses for so long, the profiler may run out of storage space to capture that, so i am not 100% sure it will give you any meaningful results. still worth a shot.