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

Hang when Generating Asset Preview (Importing Small Assets / Inspector)

Discussion in 'Editor & General Support' started by edwardrowe, Sep 11, 2018.

  1. edwardrowe

    edwardrowe

    Joined:
    Feb 11, 2014
    Posts:
    52
    We are doing procedural world generation using a room system. Each Room is a Prefab. These rooms have Tilemaps inside them, more prefabs, all sorts of stuff.

    The issue we've been having is that *most* of the time, when the Library is built on a new project (or in Cloud Build) it will hang on the first room prefab it finds during "Importing Small Assets". I attached Visual Studio and paused, to see the callstack. That seems to indicate it is crashing when creating the thumbnail for the asset preview [UnityEditor.PreviewRenderUtility.Render()] You can also crash it just by selecting rooms in inspector, with the Asset Preview panel open. This also has a callstack ending in PreviewRenderUtility.Render, but originates from the GUI loop.

    I am having trouble pinpointing the issue without having access to Unity source code. Basically all I can do is remove components one by one to see if it still crashes...

    I've attached a screenshot of the callstack when it fails on import. Could really use some input from some Unity people. This has been a real productivity crusher.
     

    Attached Files:

  2. edwardrowe

    edwardrowe

    Joined:
    Feb 11, 2014
    Posts:
    52
    It also seems to crash even when I remove all my scripts from the prefabs. I've left native Unity components, though.
     
  3. edwardrowe

    edwardrowe

    Joined:
    Feb 11, 2014
    Posts:
    52
    I totally realize there's just about no information in here to reproduce this except tilemaps inside prefabs. This is mostly just a Hail Mary in case someone's experienced something similar or if there's a known issue with asset preview / thumbnail generation. Thanks!
     
    Last edited: Sep 13, 2018
  4. edwardrowe

    edwardrowe

    Joined:
    Feb 11, 2014
    Posts:
    52