All assets appear black in preview

Hi everyone,

I’m having an issue with the asset preview in Unity 2022.2.15 with HDRP rendering pipeline. Basically, all assets in the project appear black in the preview window, but if I modify any property, they show up correctly. However, when I save the scene or restart the editor, the black preview comes back and makes it impossible to work with the assets.

I’ve recorded a video showing the problem, which you can watch here: https://youtu.be/znZ4CQMrrl8

I’m using the default lit shader that comes with HDRP for the materials, and the problem also happens with prefabs.

Deleting the library and reimporting the entire project does not solve the issue.

I just tested by creating a new project and importing the HDRP package. After creating a material, when I save the scene, the material preview turns black. This project doesn’t have any other packages installed besides HDRP and its dependencies.

Has anyone else experienced this issue, or knows how to fix it?

Thanks in advance for your help.

2 Likes

Having the same issue although it’s inconsistent for me (doesn’t happen for textures or imported FBX, only prefab’d materials+meshes). Only happens in HDRP as well… I’ve created sample projects in URP and BuiltIn, those are fine.

It’s not an HDRP/pink materials issue, but one workaround is to use BetterLitShaders insead of HDRP/Lit (if you own it). Not terribly elegant but changing the shader fixes it for that item’s preview.

Just updated to 2022.2.16… seems to have fixed it for me. Or at least I haven’t been able to repeat it since updating… Normal HDRP/Lit shaders.

8967000--1232466--Screenshot 2023-04-22 135405.png 8967000--1232469--Screenshot 2023-04-22 135557.png

First, thank you for your previous response, but unfortunately, I have updated the test project I created before and the issue still persists. Upon further testing, it seems to be related to the metallic option of the material. If it’s set to 0, the material will appear completely black in the preview, and if it’s set to 0.5, the material will appear partially darkened. I just created a new material to test it, and the same problem always occurs.

In the image I uploaded, you can see the material configurations. On the far left is the first material with the metallic value set to 1, and to its right is the second material with a value of 0. In the inspector preview, the second material appears correctly, but in the project window preview, it appears completely black when saved.

1 Like

Yeah beat me to it… yeah not fixed after all. Random one off on my part…

BetterLit or HDRP/Lit not making a difference either.

I’m seeing this in 2021 LTS. Not sure if it was introduced in 2021.3.24, or I just didn’t notice until now.

Does anyone know if this is a tracked bug?

it´s seems that in 2022.2.21 it´s fixed in hdrp, i think that these is the case: Unity Issue Tracker - [URP] Material icons in Project tab are broken after switching to URP
although it only talks about upr, it seems that in hdrp it is fixed, I have verified it in the same project that I use to answer this topic and when I modify a property of a material, all the previews are reloaded not only the material that is edited, I think this is not the best solution, but when I save the scene, the material previews are fine.

After updating my main project I see that it still has problems, now when you modify any property all the materials that are seen in the inspector are seen correctly but when you change folders or scroll they are black again, it is an improvement compared to how it was before but still having a lot of problems.

I am having the same exact problem in my project and it’s driving me crazy, as it makes browsing prefabs a nightmare, since they all are shown in pure black. I am using Unity 2023.1.11f1.

Some pieces of information to help the Unity people find the cause:

  • All materials using HDRP/Lit shader show as black in the project browser, unless you bring the “metallic” property way up.
  • Upon changing any of the properties of the material, the preview looks fine again, but if you leave the folder and return, it goes back to being black.
  • Reimporting and deleting the library and rebuilding it does not help.
  • All prefabs using those materials will also show as black, both in the project browser and the preview window. However, upon dragging the object in the preview window to rotate it, the colors come back to life. This does not fix the previews in the browser, though!

Not that easy to get work done on your project when your editor looks like this:

Can someone please help?

1 Like

Anyone else having this issue? Any workarounds? Any fixes coming our way?

Same issue for me in 2021.3.30 f 1, black materials and prefabs. like a black magic. With 3.14f1 was no mat / pref problem. Love when I update the project and all time have a new challenge…
Someone have solution?

Thank you.

I had the same issue, HDRP.
After updating my project to 2022.3.12f1, the problem was resolved.
Finally, I can see my materials.

Updated from 2021.3.30f1 to 2021.3.33f1 - fixed the issue.