Scripts suddenly st...

Scripts suddenly stopped working!  




while i was on section 90 in "The Ultimate Guide to 2D Mobile Game Development with Unity", all the scripts attached to any gameobject worked properly until, without any change made, all showed this error:

"The associated script cannot be loaded, please fix any compile errors and assign a valid script"

while i tried to reattach them ive got the error:

"Can't add script component 'Skeleton' because the script class cannot be found. Make sure that there are no compile errors and that the file name and class name match."

(the script name and the class name are identical)


what should i do?


I know this is obvious, but I have to ask. Did you try restarting Unity and even your computer?


yes I did

Do you have the same problem with other Unity projects?



Is 'Skeleton' the only script that cannot be found ?

If so, Try this:
Close Unity
Open the file in Notepad++ ( or similar)
Menu-> saveAs to a different name. (such as SkeletonScript.cs )
edit the Class name to match. Save

Open Unity.

Try to attach the new file to the Skeleton GameObject


all the scripts was like this but when i copied them, deleted them and imported them back again to the project - some of them worked and some of them are still showing the same error as before


tried your solution, didnt worked.




Scroll to Top

Please Login or Register