No scripts working in game!

I tried to open my game in the UNITY editor, and all it said was “The associated script cannot be loaded. Please fix any compile errors and assign a valid script”. This did not only affect one script, but every single one in the game. I’ve never had this problem before and it’s rendered my game unplayable and I spent quite some time on it. Please help!

You can’t have any broken scripts in your project. Even if not attached to a game object, they all get compiled. Find the broken script and fix or delete it. If you’ve renamed a folder outside of Unity this can happen as well. Always rename folders/scripts inside the Unity editor, so it can update the references for you.