can scripts change the image that is displayed in the project files?

I’m trying to make an inventory system that uses scriptable objects for the items. Because of that all of my scriptable objects have sprites stored in them and I thought it would be helpful for the future to be able to find each item easier in the projects files by displaying that sprite instead of the same blue cube with brackets for all of them.

Is something like that possible in unity?

I’m using unity 2020.3.18f1 if that affects anything

Maybe:

You can create a custom Editor for your ScriptableObject and override its RenderStaticPreview method. That’s used when rendering the object’s representation in the editor (outside the object’s own Inspector), such as when picking an asset, ,browsing the Project window. It’s even shown in the top corner of the inspector. You can use the method to resample the sprite to the required size, or even to render a 3D object.
The only missing feature for me (and perhaps for you too) is that the icon is not shown in the Project view when showing the smallest icons possible. Since I am using the classical single column project view, I don’t get to see the asset previews correctly, but for anyone who uses the double column view with slightly zoomed icon this will work.

Here, this is what it looks like in my project. Note that the objects being displayed are not meshes or prefabs, but ScriptableObjects that contain rules for procedural mesh generation. The RenderStaticPreview method generates a basic procedural mesh from those rules and renders that as a preview.
191127-image-2022-01-13-120307.png