Wednesday, 1 January 2020

Unity 3D - 2019 - Shader Cache - 300MB + files in the Library\ShaderCache

For just thew first build for Android - Unity 3D - 2019 - 300MB + files in the Library\ShaderCache

C:\Win_UnityProjs\SueBlackman_book_1_Fogg\Library\ShaderCache

Seems they need not be pushed to the GIT Repo

Individual shader variant compilation results are cached in the project, under Library/ShaderCache folder. 

This means that 100% identical shaders or their snippets will reuse previously compiled results. [Presuming this is during the BUILD Process that the Shaders will reuse the  - previously compiled results - which then implies that these can not be deleted ...]

 It also means that the shader cache folder can become quite large, if you have a lot of shaders that are changed often. It is always safe to delete it; it will just cause shader variants to be recompiled. [Seems like contradictory statements here - ?? ]

Source - https://docs.unity3d.com/Manual/class-Shader.html?_ga=2.225013464.350588414.1577908914-1931583984.1577027905


No comments:

Post a Comment