Performance warning: There are more than 100 preview scenes.

Version: 2021.1.0f1

I keep getting this warning message in the console, “[Worker0] Performance warning: There are more than 100 preview scenes. There might be code not releasing the preview scene after creating it.” Does anyone know where to start looking to resolve this? I comes along with another warning, “[Worker0] Unable to allocate new scene culling mask”.

Clearing it’s telling me something is not getting deallocated when running/stopping playing in the editor. I just have no idea how to hunt this down.

1 Like

me too, and this happened when I updated my Engine to 2021.1
the full message i get is like this:
[Worker1] Performance warning. There are more than 100 preview scenes. There might be code not releasing the preview scene after creating it.

Please attach your Editor.log file and your asset worker log files. You can find those under:

%LOCALAPPDATA%/Unity/Editor/Editor.log
/Logs/AssetImportWorker0.log

Thanks,

1 Like

@jonathans42 of course it’s gone away now but I’ll be sure to upload the log here if it happens again.

1 Like

Ran into this bug in my current project, attaching logs here.

7080799–842536–AssetImportWorker0.txt (2.27 MB)
7080799–842539–Editor.txt (2.69 MB)

By looking at the logs, it seems to be some process that try to generate all asset previews. Are you using any 3rdparty library that could be doing when you open your project?

how to resolved it if 3rdparyt libray cause it?

Same issue here, causing all asset previews to disappear. Pretty annoying to navigate in the project windows without them.
I have many 3rd party libs, Odin, ProBuilder, Dotween … Hard to tell, I’ve used them for a long time in every projects

The two warnings pop out after creating a prefab from the hierarchy for instance (or if I duplicate a material, but not only)

  • [Worker0] Unable to allocate new scene culling mask
  • [Worker0] Performance warning: There are more than 100 preview scenes. There might be code not releasing the preview scene after creating it.

I’ve captured the editor log :
Editor Log

Start importing Assets/_Project/Prefabs/Blocks/Tree Leave.prefab using Guid(fcb39a50b2806b2419d132528b3835cf) Importer(-1,00000000000000000000000000000000) → (artifact id: ‘56e627b56eede2da0368b548f19fe612’) in 0.066068 seconds
Refreshing native plugins compatible for Editor in 1.31 ms, found 3 plugins.
Preloading 0 native plugins for Editor in 0.00 ms.
RefreshInfo: StopAssetImportingV2(NoUpdateAssetOptions) scanfilter:
RefreshProfiler: Total: 425.578ms
InvokeBeforeRefreshCallbacks: 0.000ms
ApplyChangesToAssetFolders: 0.054ms
Scan: 7.421ms
OnSourceAssetsModified: 0.592ms
InitializeImportedAssetsSnapshot: 8.883ms
GetAllGuidsForCategorization: 1.199ms
CategorizeAssets: 7.543ms
ImportAndPostprocessOutOfDateAssets: 348.332ms (3.865ms without children)
ImportManagerImport: 69.605ms (3.112ms without children)
ImportInProcess: 66.464ms
UpdateCategorizedAssets: 0.029ms
PostProcessAllAssets: 262.450ms
ReloadImportedAssets: 0.000ms
EnsureUptoDateAssetsAreRegisteredWithGuidPM: 0.717ms
InitializingProgressBar: 0.003ms
PostProcessAllAssetNotificationsAddChangedAssets: 0.444ms
OnDemandSchedulerStart: 0.443ms
RestoreLoadedAssetsState: 3.952ms
UpdateImportedAssetsSnapshot: 6.854ms
ReloadSourceAssets: 1.694ms
UnloadImportedAssets: 0.217ms
Hotreload: 40.814ms
FixTempGuids: 0.005ms
GatherAllCurrentPrimaryArtifactRevisions: 0.276ms
UnloadStreamsBegin: 0.141ms
LoadedImportedAssetsSnapshotReleaseGCHandles: 1.888ms
GetLoadedSourceAssetsSnapshot: 7.872ms
PersistCurrentRevisions: 0.361ms
UnloadStreamsEnd: 0.129ms
GenerateScriptTypeHashes: 0.065ms
Untracked: -1.845ms
Start ondemand import (priority ImportantBackground): Assets/_Project/Prefabs/Blocks/Tree Leave.prefab (Guid(fcb39a50b2806b2419d132528b3835cf) Importer(815301076,1909f56bfc062723c751e8b465ee728b))
[Worker0] Start importing Assets/_Project/Prefabs/Blocks/Tree Leave.prefab using Guid(fcb39a50b2806b2419d132528b3835cf) Importer(815301076,1909f56bfc062723c751e8b465ee728b) [Worker0] Unable to allocate new scene culling mask

[Worker0] Performance warning: There are more than 100 preview scenes. There might be code not releasing the preview scene after creating it.

[Worker0] → (artifact id: ‘584b6606d93855aae8b77c29b60d6f15’) in 0.129636 seconds

Immediately after, all Project previews are cleared / disappear :confused:

I fixed one issue that was causing this when indexing assets using Quick Search. The fix should be available in 2021.2 and com.unity.quicksearch@3.0.0-preview.11 in the following weeks.

But in your case I am not sure if the warnings are triggered by the same system.

3 Likes

Thanks for your reactivity!
I indeed suspect the warnings to be triggered by a third party plugin but they disappeared and I cannot reproduce the bug now :face_with_spiral_eyes:

how do you attach the two files to stop the bug?

Same problem here. I’m using visual scripting and 2d packages just from unity registry, no third party packages. The error often happens when I’m duplicating prefabs. Or crating new ones form hierarchy. (simple prefabs just empty object as container with one child object (sprite). hmm

7397264–903533–AssetImportWorker0.txt (414 KB)
7397264–903536–Editor.txt (1.25 MB)

2 Likes

i am using mac but i can’t seem to find a folder in finder with the unity/editor/etc. can you help me

It is probably a hidden folder. You can see it via the terminal if you type in “ls -la”, but if you don’t know how to navigate in terminals, then google says: “A quick and easy way to find secret files within a folder is to open the Finder and press Command + Shift + . (full stop/period)”.

Same issue right when I started duplicated items in my prefab

I solved the problem just by caching the “Temporary” scene and resetting it when it needs to be used again by removing all objects except the camera and light. By pooling the scene this way, I’m not destroying and creating scenes and only ever use one. I haven’t noticed any negative impacts on performance to generate thumbnail previews.

This isn’t a solution imo because destroying or closing the scene should remove it completely so that if you create another then you’re back up to the same number as was used before when you had created the first one, but it seems that destroying the scene doesn’t actually destroy it like it’s supposed to, it just invalidates it so that the methods that depend on an initialized scene don’t work anymore.

Unless we’re all doing something wrong in how we “destroy” it? But so far I’ve not seen anything in the documentation that indicates that.

unity 2021.2f still get this error…

Same warning here : 2021.2.0f1

@jonathans42

Still happens on 2021.2.0f1, here are the logs, 7zipped as they’re pretty big otherwise.

Thanks for your help :slight_smile:

7641268–952066–Editor.7z (292 KB)
7641268–952069–AssetImportWorker0.7z (72.2 KB)