Search Issue Tracker
Fixed in 2022.1.X
Fixed in 2021.2.X
Shader cache grows indefinitely
Shader cache has no means of automatically purging old entries. This means that the cache grows indefinitely unless manually deleted. The problem with manual cache purge is that there is no way to preserve the currently valid data, so full recompilation is required after it. When iterating changes on complex shaders and especially when touching include files that are used in multiple shaders, the cache size can quickly grow into gigabytes range. This can eventually lead into out of disk space situation.
May 29, 2021 20:53
And it seems issue can be the reason for Unity to hang on switching Game/Editor mode
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- [Linux] Editor assertion causes Test Runner to fail when executing it in Batch Mode
- Color selection by the mouse cursor is still enabled when the "Esc" button is pressed
- Game view becomes black and the Scene window becomes grey, “ArgumentOutOfRangeException” errors and “Render Pipeline error” warnings appear after changing the name or deleting URP/HDRP global settings file
- Transform Component is not accessible inside the Player when RuntimeInitializeOnLoadMethod is used
- [Linux][Plastic SCM] Unity Version Control window text is replaced by the key names of the labels and buttons
Resolution Note (fix version 2022.1):
Restructured the shader cache to allow proper revision handling and eviction policy. It is now also possible to clear the cache for specific shader assets manually due to the new structure.