Missing mono script

I had an error in a script (which I fixed) and now the 157 components that use that script all say “Missing mono script”. I know there are hundreds of posts on this error message going on for years, but I have a different question. I have a backup from yesterday. I want to restore files from the backup before Unity forgot the name of the script. I want to restore the smallest amount possible (just whatever folder controls what components are on the objects). What is the smallest set of folders/files I can restore to get back the script name for all those gameobjects?

Whatever it isn’t today that it was yesterday. There really isn’t any more specific response.

I’m sorry you’ve had this issue. Please consider using source control in order to guard and protect your hard-earned work.

Personally I use git because it is free and there are tons of tutorials out there to help you set it up.

Here’s how I use git in one of my games, Jetpack Kurt:

https://discussions.unity.com/t/807568/3

Using fine-grained source control as you work to refine your engineering:

https://discussions.unity.com/t/826718/2

Share/Sharing source code between projects:

https://discussions.unity.com/t/719810/2

Unity doesn’t “forget” the names of scripts. First verify you have exactly 0 compile errors in the entire project, not just with this specific script.

If you do end up restoring this script from a manual backup, you’ll want to restore the script and its associated meta file. Everything in the Assets folder is tracked by its meta file.

There are zero compile errors and I know the exact name of the script that Unity forgot. I just don’t want to type the script name into 157 components where Unity says “Missing mono script” for the script name. I have source control and backups. I was hoping to not have to do a full restore of the entire project, since that is very time consuming, but ended up restoring from previous day.