Making a backup of the sripts


Every time I start to use Unity I’ll make a backup of my scripts from the assets folder, in case I mess something up. Today was the first time I actually had to use the backup scripts (just copied the scripts from the backup folder and pasted them over the ones in the assets folder). Now I get this following error: “No MonoBehaviour scripts in the file, or their names do not match the file name”.

I have 15 scripts in this project and I prefer not to write them all again. So is there a way to reroute the backup files so that they would work or something? Thanks!

You need to save the meta files as well. Good luck!

Create Fresh new scripts (“Don’t forgot to name them properly”) and copy paste into them.

Hello, you should use a versioning tool like Git.

It’s really useful to avoid losing files and to works from multiple computers.