- Home /
script cannot be found.
Hi, guys I ran into this problem...my pc suddenly restart and then when I open my project later on the script can't be found in the unity editor...but in the projects folder the script is there but it's like this.. .#Script I open it in monodevelop but it's empty...
Answer by madks13 · Aug 01, 2018 at 08:50 AM
As far as i remember, files begining with '.' are considered hidden files. Maybe Unity does this too?
I don't really know. The last script that I remember was using OnBecameInvisble...should I rename the script? maybe it will become visible again? xD
One thing i learned about unity scripts : - In order for Unity to recognize a $$anonymous$$onoBehaviour script, the script should contain one class that has the same name as the script file name.
For example if you have a script named $$anonymous$$yScript.cs, you shoud have a class named $$anonymous$$yScript too. If not, Unity won't recognize the script as valid.
I remember there being documentation on these rules somewhere but can't find them at the moment.
The thing is I tried to open the script in mono but it's empty...there's nothing...It's totally working earlier then suddenly pc crashed then it's gone...It's working before my pc crashed but then now it's hidden or empty script...the last thing I did was writing the function OnBecameInvisible and then PC crashed and then it's gone...I think I should re-write the script though but I guess this problem is worthy to be solved for future referrence.
And another thing is...the meta file for the snake script is gone...I really think that's the reason why it's empty.