Search Issue Tracker
By Design
Votes
0
Found in
2021.3.46f1
2022.3.53f1
6000.0.30f1
6000.1.0a7
Issue ID
UUM-90218
Regression
No
Asset preview doesn't update on changing shader's _GlobalColor property when the shader uses global uniforms
How to reproduce:
1. Open the attached "ModelPreviewCustomer" project
2. Open the "SampleScene"
3. Select the "MyMaterial" material in the Project window
4. Note the preview images of the Material in the Project folder and in the Inspector
5. Select the "Grass" object in the Hierarchy window
6. In the Inspector window, click the "Change Color" button on the "GlobalColorController" script
7. Wait until the "Grass" object in the scene changes its color
8. Select the "MyMaterial" material in the Project window again
9. Note the preview images of the Material in the Project folder and in the Inspector
Expected result: The color change should be reflected uniformly across all previews, including the Material Inspector Preview, the Grass object Inspector, and the Project Window Previews
Actual result: The color change is shown in the Material Inspector Preview and the "Grass" object Inspector but does not appear in the Project Window Previews
Reproducible with: 2021.3.46f1, 2022.3.53f1, 6000.0.30f1, 6000.1.0a7
Reproducible on: Windows 10 (by user), Windows 11
Not reproducible on: No other environments tested
Note: There is a workaround that involves creating a material and assigning the shader with the GlobalColor to the material. However, upon reimporting the material or the object, the preview of the material and the model changes to black immediately
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Crash on RaiseException when opening a specific project
- DownloadHandlerScript.CompleteContent is called twice when building for WebGL
- Scene view has Y coordinates of the Screen Position node flipped when some of the URP features are disabled
- Volumetric fog shader variants are missing from build when "Strict Shader Variant Matching" is disabled
- Unnecessary modifications clutter the Scene when using a RectTransform driven by a LayoutGroup in a Prefab
Resolution Note:
Hello.
I took a look at this issue, and I don't believe this is a bug or something we want to support. Setting a global shader value in that way is a transient operation, ie. it is not serialized, so when you reopen the project it will default back to 0/black.
Asset preview thumbnails on the other hand are cached and serialized, so even if there was a way to force them to update with the new value, they would then be wrong the next time you open the project, because the global color property is always black on start-up.