Search Issue Tracker

Fixed in 2022.1.X

Fixed in 2021.2.X



Found in

Issue ID




Shader cache grows indefinitely

Shader System


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.

  1. 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.

Comments (1)

  1. oleg_v

    May 29, 2021 20:53

    And it seems issue can be the reason for Unity to hang on switching Game/Editor mode

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.