- Home /
force refresh / reimport of all script files in a Unity project
When I use use Unity.exe in headless mode to generate a PC target game.exe , I can see unity issue compiler arguments that has a list of *.cs C# script files. Sometimes that list might be missing a few new check-in cs files , which will result in compilation failure that said "missing assembly" , even though all the necessary cs files are present and are in the right places .
I found that if I run the unity.exe command to compile a seond time . There will be no more compilation error .
Also I found that if I delete the Library directory . The folder will be regenerated and subsequent compilations will be successful, but those are slow to perform .
How to minimize things that I need to refresh ( or deleted) so that unity can find all cs files to compile ?
Your answer
![](https://koobas.hobune.stream/wayback/20220613144500im_/https://answers.unity.com/themes/thub/images/avi.jpg)