UNITY - Instead of a script there is a blank notepad

Viewed 505

About five minutes ago everything was working fine, but after I restarted my pc, one of the scripts in unity stopped working. Other scripts can't access its methods anymore and when I try to open it, I just get a blank Windows Notepad. The assembly information is also blank. Does anyone have an idea how to fix this issue?

2 Answers

Make sure visual studio is installed, then in unity go to Edit>Preferences>External Tools and then change "External Script Editor" to visual studio.

Go to the file in file explorer. There will be a temp file of the same name. It contains all your code. Open it and copy the code to the empty file and save it. You will be good to go.

Related