- Home /
Problem is not reproducible or outdated
All of a sudden Unity has lost track of my C# files
I was working away in Unity when all of my c# scripts are no longer recognized by Unity even though they are in the project panel and when I double click on them they come in monodevelop.
But when I try to drop a C# script on a object I get a Unity dialog box that says 'Can't add component because it doesn't exist. Check to see if the file name and class match.'. it does this for every script. Objects that had c# files already attached now show an error. I don't see a C# file name that doesn't match the class name.
Any suggestion on how I can correct this? Any additional info I can provide to help solve this?
Answer by rsud · Aug 10, 2014 at 06:27 AM
Well, I solved it by deleting the last c# script I created.
I looked at it closely and the class name was not different from the filename. but I did cut and paste into it from another script.
I recreated the c# script and added the same code. Its working fine as of now.
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
I lost codes that I've coded | Files stil exist, but codes are not exist 1 Answer
Renderer on object disabled after level reload 1 Answer
C# List of Files 1 Answer