Seems like Unity will compile all the shaders in a new asset you got from the asset store, even if you didn’t use anything from that asset.
How can I find out which shaders are in use and which are not?
Because it’s enough that an asset will have several dozen shaders, to increase the compilation time by 2 hours.
An asset like this should work.
For the future, make a new project where you import a full asset and export only the assets you want to a unity package for your actual project.
What do you mean export only the assets you want?
How do I choose which asset will export?
Right click an asset/file you want to use out of a huge package, export to unity package and include dependencies.
Now only the assets you actually need will be exported for your project
Ok that could help in build size.
But the biggest issue right now, is compilation time.
A single new shaders could take hours! to strip the variants:
"
Compiling shader “DEC/Cutout Wind/Cutout Wind Translucency” pass “Forward” (vp)
[1519.16s] 100M / ~301M prepared
[3147.52s] 200M / ~301M prepared
[4614.00s] 300M / ~301M prepared
86016 / 132120576 variants left after stripping, processed in 4634.58 seconds
starting compilation…
[ 60s] 2911 / 86016 variants ready
[120s] 16632 / 86016 variants ready
[180s] 19512 / 86016 variants ready
[241s] 22508 / 86016 variants ready
[301s] 25570 / 86016 variants ready
[361s] 39484 / 86016 variants ready
[422s] 42507 / 86016 variants ready
[482s] 45384 / 86016 variants ready
[542s] 48205 / 86016 variants ready
[602s] 61646 / 86016 variants ready
[662s] 64400 / 86016 variants ready
[722s] 67198 / 86016 variants ready
[783s] 80699 / 86016 variants ready
[843s] 83543 / 86016 variants ready
finished in 895.41 seconds. Local cache hits 62962 (34.90s CPU time), remote cache hits 0 (0.00s CPU time), compiled 23054 variants (14289.26s CPU time), skipped 0 variants"
This is just one new shader from an asset I downloaded.
How do I minimize the time this takes to process?
Cam you send a screenshot of your graphics settings (and maybe urp settings) as well as link the shader?
And what’s the unity version?
What unity version?
2021.3.8f1