- Home /
Error trying to open script with Monodevelop
I have been doing the beginners shooter tutorial.
I tried to open PlayerController
script in Monodevelope via the Inspector open....
button.
I get this error message :
unable to open assets/scripts/playerController.cs: check external application preferences
Monodevelop (built in) is application set in the preferences
Please how can I fix this?
Many Thanks
Answer by Dee Va · Jun 28, 2014 at 05:16 PM
Perhaps, you didn't installed monodevelop at the setup stage or you might moved it to the another location!
try reinstalling monodevelop again (don't, if you have it in any other location) and then in unity click on edit -> Preferences -> external tools -> external tool editor
there you need to browse the monodevelop.exe file and then the error gets fixed.
Dee
Answer by SepM · Jun 28, 2014 at 05:36 PM
Yeah... that's weird. The file might be corrupted from the sounds of it, but this is a complete guess. Go to the Project panel and search for the script and single-click on it. If a code shows up in the Inspector, the file itself should be fine. If that's the case, all I have else to say is rebooting (close and open) Unity and MonoDevelop and see if that improves anything. Sorry if this wasn't much help to you.
Answer by richard longshaw · Jun 28, 2014 at 06:29 PM
Thanks for your prompt replies. This problem has stopped me completely in my tracks - was doing ok until this happened. The script shows up fine in the Inspector - its when I try to open it from there the error occurs. I`ve tried setting the preferences / External Tools to Monodevelop. I have searched for the .exe file within the Unity folder although its not obvious which file to use. I have tried opening .exe directly (outside of Unity) which i think may have been the correct file. The best I get is a Dos/console window flash up briefly then dissappear.
Any more ideas
Thanks
Well, it seems the file itself if okay. Can you open any other scripts? If that's the case, try making a new one then copy and paste from the original PlayerController. Find the PlayerController script on your computer and try opening it up with a text editor, since you can't do so on $$anonymous$$onoDevelop. Copy everything from that and paste it into your new script. After that, try assigning it to your game object in the place of the original. (Nothing fancy, I know. -_-') The only thing I don't like about doing things this way is that you'll have to either go into every single script and change their codes, or rename the new file to match the original, so that inter-code relationships and all that complicated stuff aren't messed up. I'm really crossing my fingers here! Hope this works!
have solved the problem. Updated Windows .net framework to newest version. Uninstalled Unity then reinstalled it. Now works - Not sure why but happy! Thanks