- Home /
Unity crash deletes my script, is there anyway to recover it?
Hey, I'll start off by saying that this started with my Unity crashing my computer whilst I was rendering the lighting with Unity 5. Once I came back from the crash I had some errors in my console so I checked and it says that it can't find a script when it is definitely there. I then go to check this script in the scene and it tells me to fix compiler errors when the error itself is the script being missing (I think due to the class being removed). However when I went to open the script it is now completely blank and it has deleted the entire script which is a huge problem for me, I save my scripts almost every other second so it's not a problem with it not being saved. I am not new to unity and have been using it for years, the script is in C#.
Here is a screenshot:
Also, is here is another screenshot of the script:
Have you looked the folder using the OS file browser? What's the file size of your script. If it's indeed empty you may have to restore it from your source control or backup.
Yeah it was a strange one, Unity just deleted everything inside the script. I tried to open it in a lot of different text editors and they all showed nothing and I have no backups since it is a new project. I've just decided to re write the script.
Definitely start learning source control. Git is your friend in times of need.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Game doesnt start after adding Admob 1 Answer
Can two components require each other? 2 Answers