Search Unity

Performance warning: There are more than 100 preview scenes.

Discussion in 'Editor & General Support' started by BinaryByron, Mar 27, 2021.

  1. BinaryByron

    BinaryByron

    Joined:
    Sep 16, 2016
    Posts:
    12
    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.
     
    Last edited: Mar 28, 2021
    Jesper-Nielsen likes this.
  2. abushaheen

    abushaheen

    Joined:
    Feb 18, 2021
    Posts:
    4
    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.
     
  3. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    514
    Please attach your Editor.log file and your asset worker log files. You can find those under:

    %LOCALAPPDATA%/Unity/Editor/Editor.log
    <project root>/Logs/AssetImportWorker0.log

    Thanks,
     
    Magic-Thor likes this.
  4. BinaryByron

    BinaryByron

    Joined:
    Sep 16, 2016
    Posts:
    12
    @jonathans42 of course it's gone away now but I'll be sure to upload the log here if it happens again.
     
    jonathans42 likes this.
  5. LaDigitalRose

    LaDigitalRose

    Joined:
    Nov 20, 2020
    Posts:
    2
    Ran into this bug in my current project, attaching logs here.
     

    Attached Files:

  6. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    514
    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?
     
  7. EurekaChen

    EurekaChen

    Joined:
    Jan 16, 2019
    Posts:
    1
    how to resolved it if 3rdparyt libray cause it?
     
  8. Qhuhuit

    Qhuhuit

    Joined:
    Feb 17, 2018
    Posts:
    39
    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
     
  9. Qhuhuit

    Qhuhuit

    Joined:
    Feb 17, 2018
    Posts:
    39
    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 :
    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 :/
     
  10. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    514
    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.
     
    Magic-Thor, treeeza and Qhuhuit like this.
  11. Qhuhuit

    Qhuhuit

    Joined:
    Feb 17, 2018
    Posts:
    39
    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 :confused:
     
  12. Olliechisman

    Olliechisman

    Joined:
    Jul 8, 2020
    Posts:
    1
    how do you attach the two files to stop the bug?
     
  13. unity_c0u2Pc0s0B9IRQ

    unity_c0u2Pc0s0B9IRQ

    Joined:
    Sep 12, 2020
    Posts:
    1
    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
     

    Attached Files:

    Behappy859 and Sfen47 like this.
  14. roborte

    roborte

    Joined:
    Jul 31, 2021
    Posts:
    1
    i am using mac but i can't seem to find a folder in finder with the unity/editor/etc. can you help me
     
  15. tixieej

    tixieej

    Joined:
    Sep 19, 2020
    Posts:
    1
    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)".
     
  16. Sfen47

    Sfen47

    Joined:
    Jul 23, 2019
    Posts:
    1
    Same issue right when I started duplicated items in my prefab
     
  17. GinoMan2440

    GinoMan2440

    Joined:
    Feb 14, 2018
    Posts:
    9
    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.
     
  18. haim96

    haim96

    Joined:
    May 24, 2013
    Posts:
    107
    unity 2021.2f still get this error...
     
  19. sama-van

    sama-van

    Joined:
    Jun 2, 2009
    Posts:
    1,734
    Same warning here : 2021.2.0f1

    upload_2021-11-4_14-9-2.png
     
  20. aybe

    aybe

    Joined:
    Feb 20, 2019
    Posts:
    55
    @jonathans42

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

    Thanks for your help :)
     

    Attached Files:

  21. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    514
    I think we'll need a sample project or your project that repro the issue. I can't see anything particular from the logs unfortunately :(
     
  22. aybe

    aybe

    Joined:
    Feb 20, 2019
    Posts:
    55
    jonathans42 likes this.
  23. aybe

    aybe

    Joined:
    Feb 20, 2019
    Posts:
    55
    @jonathans42

    Forgot to mention, in any case when you start the project the errors don't show up, right-click Assets and Reimport, then after that, select all the folders to see all the assets, the errors will pop up.

    That brings another question, why aren't the previews being triggerred at startup ? Because when starting Unity, none of the previews are actually shown.

    Thanks :)
     
    jonathans42 likes this.
  24. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    514
    Hi, I wasn't able to reproduce the warning message, but I noticed that the preview do not show up in the project browser. That said they do show up in the Search Window, so I wonder if this is some other issue.

    upload_2021-11-15_9-10-35.png
     
  25. aybe

    aybe

    Joined:
    Feb 20, 2019
    Posts:
    55
    This is puzzling to say the least, here, at some point after reimporting the folder, some will start appearing as you scroll down and then of course, others will not as the warnings are being shown in the console.

    What's even more puzzling is that now I've upgraded to latest version, the bug is simply gone!!! It hasn't happened a single time and all the previews are always visible. (but there's nothing mentioning it in the release notes)

    One thing's weird for sure is the asset index window, it always shows Loading the index... even though if you let the background task run to completion, save the project and restart Unity afterwards. (not sure if that has any influence though)
     
  26. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    514
    Hmm ok, it stays like this even if you press Build again?
     
  27. aybe

    aybe

    Joined:
    Feb 20, 2019
    Posts:
    55
    After thoroughly testing that stuff these last days, here are my findings:

    I've upgraded to 2021.2.3f1,

    The index will never update itself unless you double-click the asset to open it, this, even though if you, say, try to create a new material to trigger an index update.

    However, I got the Loading the index... problem fixed somehow, this, by deleting the index asset itself and creating a new one; not sure if it got corrupted in some way as it was created on a previous version of Unity, still, the problem is gone and the index itself appears to be more reactive.

    Last but not least, the warnings about the inability to create scene previews are gone and all the previews are working as expected. Something's definitely been fixed in Unity as the last two versions exhibited a bug in the project browser: the background of assets was mostly the same like project browser window background color; now it's back to a darker tone as usual.

    And to reply to your question... In fact, the build button has apparently always worked... I just figured out that by moving the mouse into both the asset window and the background tasks window, they get refreshed once the mouse in and show what is expected; so it looks like a very simple repaint bug to fix!
     
  28. VictorBispo

    VictorBispo

    Joined:
    May 23, 2018
    Posts:
    1
  29. XRA

    XRA

    Joined:
    Aug 26, 2010
    Posts:
    265
    encountering this on 2021.2.0f1 seems to occur anytime I create a texture asset and then save it to the asset database (overwriting the existing texture asset, such as a cubemap), eventually the preview window for the texture stops displaying and it spams the warning.

    Also have the issue where assets that get saved over with
    AssetDatabase.CreateAsset cannot be deleted or refreshed until an assembly reload, (displays the "The operation "SoftDelete" cannot be executed because the selection is a root folder." warning) which is a separate issue but related to saving over an existing asset.
     
    Last edited: Nov 28, 2021
  30. VinyxAi

    VinyxAi

    Joined:
    Jul 15, 2018
    Posts:
    8
    Encountering this issue on 2021.1.24f1.

    Also getting perhaps related issues that i can not tell how to replicate:
    Sometimes I get a single editor error if i Hit play after loading project and i have something selected in the Hierarchy that moves.
    Sometimes when i'm searching through project files, i get warning spam when i'm moving the mouse anywhere. Stops when i clear the search field with the "x".

    I'll update this post or repost when/if i get exact error message/trace of these issues again. But basically there seem to be many editor related rendering issues that started since i upgraded to 2021s.
     
  31. zikusokaterry

    zikusokaterry

    Joined:
    Nov 30, 2021
    Posts:
    1
    Try restarting Unity it worked for me
     
  32. Immersive-Matthew

    Immersive-Matthew

    Joined:
    Mar 24, 2020
    Posts:
    137
    Did this ever get resolved as I am not seeing the solution here?
     
    grofie and Pyromuse like this.
  33. MOBILIN

    MOBILIN

    Joined:
    May 6, 2017
    Posts:
    15
    Now I also got the same problem on Unity 2021.2.8f1.
     
    grofie and Immersive-Matthew like this.
  34. Kazinir

    Kazinir

    Joined:
    Dec 14, 2019
    Posts:
    2
    I also got the same problem and on several projects for 1 years
     
  35. FICHEKK

    FICHEKK

    Joined:
    Feb 6, 2016
    Posts:
    6
    I also get this problem (Unity 2021.2.11). Could someone from Unity please explain what that message even means? What are preview scenes anyway?
     
  36. Naver78

    Naver78

    Joined:
    Oct 26, 2020
    Posts:
    4
    I got this problem too :(
     
  37. Danguba

    Danguba

    Joined:
    May 16, 2018
    Posts:
    2
    me to, started after I imported the damn text mesh stuff for the first time!
     
  38. Mojo-Game-Studio

    Mojo-Game-Studio

    Joined:
    Sep 18, 2015
    Posts:
    111
  39. JingizuIneluki

    JingizuIneluki

    Joined:
    Feb 25, 2017
    Posts:
    3
    Hi, I've had the same problem in Unity 2021.1.23, I've reloaded the Layout and the problem have disappeared, hope it works for you
     
  40. leozzyzheng2

    leozzyzheng2

    Joined:
    Jul 2, 2021
    Posts:
    63
    Same in 2021.3.2f1
     
  41. Immersive-Matthew

    Immersive-Matthew

    Joined:
    Mar 24, 2020
    Posts:
    137
    Why is Unity so absent here?
     
  42. PassivePicasso

    PassivePicasso

    Joined:
    Sep 17, 2012
    Posts:
    100
    For anyone else encountering this problem, for me it was a result of using the TextureInspector's PreviewGUI manually by calling UnityEditor.CreateEditor on a RenderTexture.
    This editor's previews create some preview scenes and doesn't expose a way to clean them up when you're launching the previews externally.

    Due to the fact that I didn't want to rewrite this feature from scratch, and because a large amount of functionality is locked behind internal classes which we don't have access to, I decided to use reflection to acquire the MethodInfo for TextureInspector.OnDisable and called it in the appropriate places in my editor, such as in OnDisable and some other places that made sense in the context.

    Obviously this wouldn't be a supported approach and you shouldn't leverage the existing TextureInspector in this way I just don't care about dealing with the related maintenance issues.
     
    aybe likes this.
  43. aybe

    aybe

    Joined:
    Feb 20, 2019
    Posts:
    55
    I'm doing the same thing but sporadically I still get the following error:

    Performance warning: There are more than 100 preview scenes. There might be code not releasing the preview scene after creating it.
    UnityEditor.Texture3DPreview:OnEnable ()


    Any ideas?

    Thank you.

    I call this wrapper from an ObjectPreview, it works well except for the above message.

    Code (CSharp):
    1. using System.Collections.Generic;
    2. using System.Linq;
    3. using System.Reflection;
    4. using JetBrains.Annotations;
    5. using UnityEditor;
    6. using UnityEngine;
    7. using UnityEngine.Assertions;
    8.  
    9. namespace XYZ.Editors
    10. {
    11.     [PublicAPI]
    12.     public sealed class TexturePreview
    13.     {
    14.         private readonly Dictionary<Object, Texture> Dictionary = new();
    15.  
    16.         private Editor Editor = null!;
    17.  
    18.         public void Initialize(Object[] targets, System.Func<Object, Texture> func)
    19.         {
    20.             foreach (var target in targets)
    21.             {
    22.                 Dictionary.Add(target, func(target));
    23.             }
    24.  
    25.             Assert.IsNull(Editor);
    26.  
    27.             Editor = Editor.CreateEditor(Dictionary.Values.Cast<Object>().ToArray());
    28.  
    29.             // BUG Performance warning: There are more than 100 preview scenes. There might be code not releasing the preview scene after creating it.
    30.             Editor.GetType().GetMethod("OnEnable", BindingFlags.Instance | BindingFlags.NonPublic)!.Invoke(Editor, null);
    31.         }
    32.  
    33.         public void Cleanup()
    34.         {
    35.             Assert.IsNotNull(Editor);
    36.  
    37.             // BUG Performance warning: There are more than 100 preview scenes. There might be code not releasing the preview scene after creating it.
    38.             Editor.GetType().GetMethod("OnDisable", BindingFlags.Instance | BindingFlags.NonPublic)!.Invoke(Editor, null);
    39.  
    40.             Object.DestroyImmediate(Editor);
    41.  
    42.             foreach (var pair in Dictionary)
    43.             {
    44.                 Object.DestroyImmediate(pair.Value);
    45.             }
    46.  
    47.             Dictionary.Clear();
    48.         }
    49.  
    50.         public string GetInfoString()
    51.         {
    52.             return Editor.GetInfoString();
    53.         }
    54.  
    55.         public GUIContent GetPreviewTitle()
    56.         {
    57.             return Editor.GetPreviewTitle();
    58.         }
    59.  
    60.         public bool HasPreviewGUI()
    61.         {
    62.             return Editor.HasPreviewGUI();
    63.         }
    64.  
    65.         public bool MoveNextTarget()
    66.         {
    67.             return Editor.MoveNextTarget();
    68.         }
    69.  
    70.         public void OnInteractivePreviewGUI(Rect r, GUIStyle background)
    71.         {
    72.             Editor.OnInteractivePreviewGUI(r, background);
    73.         }
    74.  
    75.         public void OnPreviewSettings()
    76.         {
    77.             Editor.OnPreviewSettings();
    78.         }
    79.  
    80.         public Texture2D RenderStaticPreview(string assetPath, Object[] subAssets, int width, int height)
    81.         {
    82.             return Editor.RenderStaticPreview(assetPath, subAssets, width, height);
    83.         }
    84.  
    85.         public void ResetTarget()
    86.         {
    87.             Editor.ResetTarget();
    88.         }
    89.     }
    90. }
     
  44. PassivePicasso

    PassivePicasso

    Joined:
    Sep 17, 2012
    Posts:
    100
    I'd suggest not doing it to be honest. I had thought I resolved the problem but ended up recreating it when using this.
    I opted to make a custom UIToolkit control which has the functionality I need (selecting rendering R,G,B, and A channels)
    The important part was just to call these two EditorGUI methods to draw the texture using a ColorWriteMask to pick which to call.
    Code (CSharp):
    1.  
    2. if (previewMask == ColorWriteMask.Alpha)
    3.   EditorGUI.DrawTextureAlpha(contentSize, image, ScaleMode.ScaleToFit);
    4. else
    5. {
    6.   if (previewMask == 0) previewMask = ColorWriteMask.All;
    7.   EditorGUI.DrawPreviewTexture(contentSize, image, null, ScaleMode.ScaleToFit, 0, -1, previewMask);
    8. }
     
    Sluggy likes this.
  45. aybe

    aybe

    Joined:
    Feb 20, 2019
    Posts:
    55
    I guess you're right... Tried to track the error down, it comes from Texture3D preview internally and well, there really isn't much that one can do.

    I didn't know that preview settings can be done using UI elements, have to look onto this!

    Thank you.
     
    Sluggy likes this.
  46. CaesarSun

    CaesarSun

    Joined:
    Aug 7, 2017
    Posts:
    1
    I also encountered this problem, in Unity 2021.3.27. I seem to be due to MeshPreview.
     
    kong_unity110 likes this.
  47. Andragor-Inc

    Andragor-Inc

    Joined:
    Apr 4, 2019
    Posts:
    1
    Encountered the same issue, caused by a script that added padding to pixels of the blue channel of some Texture2D.
    Unity 2022.2.1f1
     
  48. daniloramos

    daniloramos

    Joined:
    Dec 22, 2023
    Posts:
    1
     
  49. vonchor

    vonchor

    Joined:
    Jun 30, 2009
    Posts:
    249
    This is an old thread, but this issue occurred this morning when I imported a large (< 10K items) asset package that creates this error every time I install it. This editor log may help (this entry is repeated many times.It may have to do with the TextureImporter not releasing the Previews? Just a guess based on the below.

    Note: asset is Super_Retro_Collection from the asset store.


    2024-02-02T16:47:57.752Z|0x630c|Performance warning: There are more than 100 preview scenes. There might be code not releasing the preview scene after creating it.
    UnityEngine.Debug:ExtractStackTraceNoAlloc (byte*,int,string)
    UnityEngine.StackTraceUtility:ExtractStackTrace ()


    UnityEditor.SceneManagement.EditorSceneManager:NewPreviewScene (bool,UnityEditor.SceneManagement.PreviewSceneFlags)
    UnityEditor.SceneManagement.EditorSceneManager:NewPreviewScene ()


    UnityEditor.PreviewScene:.ctor (string)
    UnityEditor.PreviewRenderUtility:.ctor ()
    UnityEditor.GameObjectInspector/PreviewData:.ctor (UnityEngine.Object,bool)
    UnityEditor.GameObjectInspector:GetPreviewData (bool)
    UnityEditor.GameObjectInspector:OnPreviewGUI (UnityEngine.Rect,UnityEngine.GUIStyle)
    UnityEditor.Editor:OnInteractivePreviewGUI (UnityEngine.Rect,UnityEngine.GUIStyle)
    UnityEditor.ObjectPreview:DrawPreview (UnityEditor.IPreviewable,UnityEngine.Rect,UnityEngine.Object[])
    UnityEditor.AssetImporters.AssetImporterEditor:DrawPreview (UnityEngine.Rect)
    UnityEditor.PropertyEditor:DrawPreview (UnityEditor.IPreviewable)
    UnityEditor.PropertyEditor:DrawPreviewAndLabels ()
    UnityEngine.UIElements.IMGUIContainer:DoOnGUI (UnityEngine.Event,UnityEngine.Matrix4x4,UnityEngine.Rect,bool,UnityEngine.Rect,System.Action,bool)
    UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent (UnityEngine.Event,UnityEngine.Matrix4x4,UnityEngine.Rect,System.Action,bool)
    UnityEngine.UIElements.IMGUIContainer:DoIMGUIRepaint ()
    UnityEngine.UIElements.UIR.RenderChainCommand:ExecuteNonDrawMesh (UnityEngine.UIElements.UIR.DrawParams,single,System.Exception&)
    UnityEngine.UIElements.UIR.UIRenderDevice:EvaluateChain (UnityEngine.UIElements.UIR.RenderChainCommand,UnityEngine.Material,UnityEngine.Material,UnityEngine.Texture,UnityEngine.Texture,single,System.Exception&)
    UnityEngine.UIElements.UIR.RenderChain:Render ()
    UnityEngine.UIElements.UIRRepaintUpdater:Update ()
    UnityEngine.UIElements.VisualTreeUpdater:UpdateVisualTreePhase (UnityEngine.UIElements.VisualTreeUpdatePhase)
    UnityEngine.UIElements.Panel:UpdateForRepaint ()
    UnityEngine.UIElements.Panel:Repaint (UnityEngine.Event)
    UnityEngine.UIElements.UIElementsUtility:DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel)
    UnityEngine.UIElements.UIElementsUtility:UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (int,intptr,bool&)
    UnityEngine.UIElements.UIEventRegistration:ProcessEvent (int,intptr)
    UnityEngine.UIElements.UIEventRegistration/<>c:<.cctor>b__1_2 (int,intptr)
    UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

    [C:\build\output\unity\unity\Editor\Src\SceneManager\EditorSceneManager.cpp line 686]
     
  50. vonchor

    vonchor

    Joined:
    Jun 30, 2009
    Posts:
    249
    There's also this. The GridPaintPaletteClipboard is the UIElement part of the Tile Palette which displays the palette prefab's Tilemap. This message occurs every time I do a scripting reload. Again, I have third-party palettes, two of which are about 7K tiles each. This doesn't occur when these two huge tilesets aren't present in the Project.

    Perhaps it'd be better for the PaletteClipboard to do this in a more lazy fashion? IDK.

    Unity 2022.2.3

    It appears to be harmless but no one likes spurious error/warning messages :)


    [./Library/PackageCache/com.unity.2d.tilemap@1.0.0/Editor/GridPaintPaletteClipboard.cs line 379]

    2024-02-02T17:21:40.282Z|0x630c|Performance warning: There are more than 100 preview scenes. There might be code not releasing the preview scene after creating it.
    UnityEngine.Debug:ExtractStackTraceNoAlloc (byte*,int,string)
    UnityEngine.StackTraceUtility:ExtractStackTrace ()
    UnityEditor.SceneManagement.EditorSceneManager:NewPreviewScene (bool,UnityEditor.SceneManagement.PreviewSceneFlags)
    UnityEditor.SceneManagement.EditorSceneManager:NewPreviewScene ()
    UnityEditor.PreviewScene:.ctor (string)
    UnityEditor.PreviewRenderUtility:.ctor ()
    UnityEditor.PreviewRenderUtility:.ctor (bool,bool)
    UnityEditor.Tilemaps.GridPaintPaletteClipboard:InitPreviewUtility () (at ./Library/PackageCache/com.unity.2d.tilemap@1.0.0/Editor/GridPaintPaletteClipboard.cs:379)
    UnityEditor.Tilemaps.GridPaintPaletteClipboard:OnEnable () (at ./Library/PackageCache/com.unity.2d.tilemap@1.0.0/Editor/GridPaintPaletteClipboard.cs:644)
    UnityEngine.ScriptableObject:CreateScriptableObjectInstanceFromType (System.Type,bool)
    UnityEngine.ScriptableObject:CreateInstance (System.Type)
    UnityEngine.ScriptableObject:CreateInstance<UnityEditor.Tilemaps.GridPaintPaletteClipboard> ()
    UnityEditor.Tilemaps.TilePaletteClipboardElement:OnAttachedToPanel (UnityEngine.UIElements.AttachToPanelEvent) (at ./Library/PackageCache/com.unity.2d.tilemap@1.0.0/Editor/UI/TilePaletteClipboardElement.cs:75)
    UnityEngine.UIElements.EventCallbackFunctor`1<UnityEngine.UIElements.AttachToPanelEvent>:Invoke (UnityEngine.UIElements.EventBase)
    UnityEngine.UIElements.EventCallbackRegistry/DynamicCallbackList:Invoke (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.BaseVisualElementPanel,UnityEngine.UIElements.VisualElement)
    UnityEngine.UIElements.EventDispatchUtilities:HandleEvent_BubbleUpCallbacks (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.BaseVisualElementPanel,UnityEngine.UIElements.VisualElement)
    UnityEngine.UIElements.EventDispatchUtilities:HandleEventAtTargetAndDefaultPhase (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.BaseVisualElementPanel,UnityEngine.UIElements.VisualElement)
    UnityEngine.UIElements.VisualElement:HasChangedPanel (UnityEngine.UIElements.BaseVisualElementPanel)
    UnityEngine.UIElements.VisualElement:SetPanel (UnityEngine.UIElements.BaseVisualElementPanel)
    UnityEngine.UIElements.VisualElement/Hierarchy:SetParent (UnityEngine.UIElements.VisualElement)
    UnityEngine.UIElements.VisualElement/Hierarchy:Insert (int,UnityEngine.UIElements.VisualElement)
    UnityEngine.UIElements.VisualElement/Hierarchy:Add (UnityEngine.UIElements.VisualElement)
    UnityEngine.UIElements.VisualElement:Add (UnityEngine.UIElements.VisualElement)
    UnityEngine.UIElements.VisualElement:Add (UnityEngine.UIElements.VisualElement)
    TilePlus.Editor.Painter.TilePlusPainterWindow:CreateGUI () (at Assets/Plugins/TilePlus/Editor/Painter/TilePlusPainterWindow.cs:1820)
    TilePlus.TpLib/<DelayedCallback>d__155:MoveNext () (at Assets/Plugins/TilePlus/Runtime/StaticLib/TpLib.cs:2620)
    System.Runtime.CompilerServices.AsyncMethodBuilderCore/MoveNextRunner:InvokeMoveNext (object)
    System.Threading.ExecutionContext:RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
    System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
    System.Runtime.CompilerServices.AsyncMethodBuilderCore/MoveNextRunner:Run ()
    System.Threading.Tasks.SynchronizationContextAwaitTaskContinuation/<>c:<.cctor>b__7_0 (object)
    UnityEngine.UnitySynchronizationContext/WorkRequest:Invoke ()
    UnityEngine.UnitySynchronizationContext:Exec ()
    UnityEngine.UnitySynchronizationContext:ExecuteTasks ()
     
    Last edited: Feb 2, 2024