Unity external script editor won't change

Hello
I’ve been using unity 5.3.0f4 for almost a year and today it suddenly decided that it wants to open the scripts with code.cmd (whatever that is!). well the scripts open in mono at the and but I need to work with VS. but when I go to preferences…>External Tools , and try to change it back , nothing will change in this tab , absolutely nothing. please can someone help?

EDIT:
So if this question (unlike my other questions) got moderated, here is the cause : in the preferences there was a tab named VSCODE, I enabled integration there and that caused the editor script to stuck on code.cmd!!!

Same here ... so freaking annoyed right now.

6 Answers

6

just found your post because i had the same isue.

this fixed it for me:

search on your pc for code.cmd and delete it, it doesnt seem to effect anything and you can swap editors again

Tried this - but it keeps coming/reverting back to code.cmd even if I delete it. ARGH!!! File for me was here: C:\Program Files\Microsoft VS Code\bin\code.cmd

In case it helps anyone… to get out of this myself I:

  • Opened Unity project
  • Deleted the VSCode asset
  • Closed Unity
  • Re-opened Unity project
  • Changed my external editor
  • … the change finally stuck.

And I was so close to finally trying VSCode … forget that!! =/

Related:

PS: Sorry for formatting. Is it me or does the Unity comment editor feel/behave/work like it was built in 2001? Yikes…

Close and re-open the script works for me.

Cheers!

Still have this issue with 2020.1.0.b13

My fix:
I had to manually edit the standard program for opening .cs files in windows for uity to finally recognize VS2019 as the default editor. Even though I had changed it in preferences.

Can you explain how you edited the standard program? Were is it located? All of my preferences are not saving every time I close Unity. I'm using Unity 2020.1.5.f1 and VS 2019.16.7.6 Thanks for the help.

Well that's what I thought. Seems like this issue is sorted now, but I am a little curious as to why it's showing up in red. There must be a Systems.Collection in all .Net versions...?

One posibility that worked for me:

  1. Edit > Preferences > External Tools & change to your script editor (Visual Studio Code for me)
  2. File > Save Project
    This persisted the setting for me,One posibility that worked for me:
  3. Edit > Preferences > External Tools & change to your script editor (Visual Studio Code for me)
  4. File > Save Project
    This persisted the setting for me

Mine still doesn’t work. It says UnityVS.openfile and when I try to change it, it shows it loading the other external script editors but it stays on UnityVS.openfile.,Mine still doesn’t work for me. It says UnityVS.openfile. when I try to change it to anything else it stays on it.