List of GameObjects or Assets with Thumbnail

Hi everyone.

I am starting learning all this amazing world of extending the editor views, and I have encounter a problem and I don’t find any info about it.

I want to store a pool of prefabs in an ScriptableObject, and so I am trying to create a custom view to help myself managing all the assets. But I don’t find a way of including a visual list, either with UI Toolkit or IMGUI.

I would like to do something similar to the Terrain’s tree menu:

Ideally, it would be drag and drop, just being able to see the thumbnail is more than enough. I would appreciate any help or guidance.

UI Toolkit is the way to go.

You only need a list but the items you display should be a VisualElement with at least the background image set. Better to make a subclass so you can have an image + label among other things. You’d still only be dealing with VisualElement items in the list so you can make these elements draw whatever you see fit.

Custom ListView example:

To generate thumbnail images from an asset, use AssetPreview:

1 Like