Search Unity

Library Folder > ShaderCache size gets bigger and bigger (2019.4.19f1)

Discussion in 'Editor & General Support' started by dango_eldergrounds, Mar 24, 2021.

  1. dango_eldergrounds

    dango_eldergrounds

    Joined:
    Jul 30, 2019
    Posts:
    1
    Hi,

    I'm using Unity 2019.4.19f1. We're building for Android and I noticed that everytime I build an APK the Library folder increases in size a bit, particularly this "ShaderCache" file and these "shadercompiler-UnityShaderCompiler.exe" files. At one point my Library folder was almost 60GB because of them!! And because of the increased size, the builds started to fail because of insufficient space in my hard drive, so I had to delete the Library folder and have Unity re-import everything again. This solved the issue and the Library folder size was reduced drastically to around 5GB, but is there a better way than this? I don't want to delete the Library folder every time it gets massive because Unity building our project from scratch takes some time. Not to mention when I do this step the default platform resets to Windows and I'd have to switch platforms to Android again, which also takes times.

    Is this normal? Is this just a limitation? What can I do?

    Thanks
     
    Gleb_Palchin likes this.
  2. Gleb_Palchin

    Gleb_Palchin

    Joined:
    Jan 7, 2016
    Posts:
    22
    We have the same issue, let me know if you get any solution for this problem!

    In my case we never had such problem, for all our projects, but starting with Unity 2019.4.20f1 all projects have the Shader Cache size grow extremly fast even if we use almost the same assets as in older projects.

    So instead of ~5GB average per project we now have 40GB per project