How can I "apply" all materials again at once?

It is an old project that has made several version changes. When I did the Shipping Package, a lot of the materials were not loaded. If I delete the DerivedDataCache folder it recompiles everything, but after the Shipping Package the problem remains. When I switched a material from opaque to masked and back again, then I could click apply. This material was then loaded in the shipping package. I have a lot of material, is there a way to click apply all at once?