I got a new computer and on it I installed unity and signed in etc. when I load it up however and try adding scripts to objects in the scene it doesn't add them and has this error:

"cant add script component because the script class cannot be found".

I thought it might be something in the script but everything i tried didnt work even from the forums. I made sure it had the same name and the monobehaviour was there and everything. I even got a working script from a prior game i made on my other computer and put it in but it still didnt work. So i thought something was wrong with visual studio. However the last time i was playing around with visual studio and its installs my computer got sent into a bsod reboot loop and then just didnt turn on and it had to get re-imaged. The only other error that could be causing the scripts to not add maybe was this error that i got in the console:

"Exception: 'C:\Program Files\Unity\Hub\Editor\2019.1.8f1\Editor\Data\Tools\RoslynScripts\unity_csc.bat' not found. Is your Unity installation corrupted?"

However the worse part is that that file already exists enter image description here please help! I need to gamedev on this computer! thanks in advance;

  • 1
    \$\begingroup\$ "Is your Unity installation corrupted?" sounds like a very strong suggestion that you should uninstall Unity (and possibly Visual Studio) and re-install them from scratch. \$\endgroup\$ – DMGregory Jan 27 at 4:41
  • \$\begingroup\$ ok is im trying to do that but the instillations for the versions keep failing. My first try i did it it was stuck on installing for over 16 hours and i just decided to restart. and now its not even getting to that. The bar just gets to the end and then the installation disappears and never shows up again. Im trying again right now as well. \$\endgroup\$ – Titaniumammas69 Jan 30 at 4:42
  • \$\begingroup\$ Oh yes! I got it to work! I did it by yes, fully uninstalling unity and then re-installing it which was abit annoying but i would rather be able to use it then not use it! Thanks DMG! \$\endgroup\$ – Titaniumammas69 Mar 30 at 12:00

The error to this could not be traced and it is assumed that the installation was corrupted. This was fixed by re-installing all of unity and it worked!


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.