- Home /
The question is answered, right answer was accepted
Unity 2017 just broke my game entirely
Every script has been replaced with 'nothing selected' in the editor and I cannot add any scripts to anything. It claims they aren't there, but... they are. I haven't changed anything. I opened my project to check something. Then closed it without saving. When I opened it again, every script was allegedly missing and nothing works any more.
I can't add the scripts again, despite them being in the proper directory and viewable in both the project folder and in the file explorer. If I drag a script onto an object I get the following error message "Can't add script component because the script class cannot be found." None of the scripts have been edited.
Anyone had this problem yet? I've never had this issue before, so I can only assume it has something to do with Unity 2017.1.0f3.
Welcome to the "Now I know I need to make backup time to time" club :) Let it go and start over
I have backups already, thankfully. Otherwise my post would be filled with obscenities.
For me, the solution was going through the red flags and fixing them all. Once done you should get an API update window. Hit accept and it should work fine :)
Answer by Dave-Carlile · Jul 17, 2017 at 03:11 PM
Have you tried deleting the Library folder after exiting Unity? Sometimes allowing Unity to rebuild this folder will resolve odd issues like this. Otherwise, restore from backup and try again.
Hi, I've updated to Unity 2017 and I'm facing the same problem. I've tried deleting the library folder yet the problem still persists, also I'm getting an error related to the Scene$$anonymous$$anagement class saying: UnityEngine.Scene$$anonymous$$anagement.Scene$$anonymous$$anager' does not contain a definition for
GetActiveScene'. Can you elaborate more on how to restore from backup? Thanks.
GetActiveScene is a function not a variable. $$anonymous$$ay be you missed the brackets. GetActiveScene()
This worked for me too, thanks! I might start making a habit of deleting the Library folder whenever I update to a new Unity version because it seems to want to rebuild it every time anyway.
Worked for me as well, thank you! Was a bit afraid when it opened up to an empty scene, but all was well when I opened the scenes I had made.
It didn't work for me.
I fixed it in other way:
I add new gameObject and add one of scripts to it. It worked and all other scripts in gameObjects start working.