Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

For Unity C#: Visual Studio vs Visual Studio Code

Discussion in 'Code Editors & IDEs' started by starikcetin, Jun 22, 2017.

?

Which C# IDE do you prefer to use with Unity?

  1. Visual Studio

    41.8%
  2. Visual Studio Code

    48.7%
  3. MonoDevelop or Xamarin Studio

    1.6%
  4. Other (consider also writing a reply)

    7.9%
  1. starikcetin

    starikcetin

    Joined:
    Dec 7, 2017
    Posts:
    340
    Which goes better with Unity when scripting with C#? What are the good, the bad, and the ugly?

    What are you opinions on this?

    Don't forget to cast a vote.
     
    rakkarage likes this.
  2. Mathijs_Bakker

    Mathijs_Bakker

    Joined:
    Apr 28, 2014
    Posts:
    25
    I didn't vote (yet)... Because I came here as a result to my: "Visual Studio (for Mac) vs Visual Studio Code" search query.
    Visual Studio for Mac or AKA Visual Studio Community is just a major upgrade to MonoDevelop/Xamarin. And I love it as my external IDE for Unity.
    However I am also curious about VS Code from Microsoft. It looks light weight but with Unity extensions available.
    Will try it for the next days.

    However JetBrains Rider looks also promising together with Unity;
     
  3. starikcetin

    starikcetin

    Joined:
    Dec 7, 2017
    Posts:
    340
    Did you try Rider? It looks visually appealing and lightweight.
     
  4. Mathijs_Bakker

    Mathijs_Bakker

    Joined:
    Apr 28, 2014
    Posts:
    25
    Not yet... I am fidling around w/ Visual Studio Code first.
     
  5. ModLunar

    ModLunar

    Joined:
    Oct 16, 2016
    Posts:
    374
    I personally use Visual Studio (I absolutely have to use the package for Visual Studio called "Codinion" that can syntax highlight your code and make it pretty!)

    Oh, and what's the difference between Visual Studio and Visual Studio Code?
     
    AntonyJeeva likes this.
  6. tswalk

    tswalk

    Joined:
    Jul 27, 2013
    Posts:
    1,109
    a lot :D
     
    AsclepiiusUnknown likes this.
  7. starikcetin

    starikcetin

    Joined:
    Dec 7, 2017
    Posts:
    340
    I didn't use Code that much, but the first thing you will notice is that it is very lightweight and faster.

    It is not a matter of a couple of button clicks to get the environment ready, you need to use integrated command line AFAIK.
     
  8. Mathijs_Bakker

    Mathijs_Bakker

    Joined:
    Apr 28, 2014
    Posts:
    25
    It's Rider all the way!!! (On MacOS)
     
  9. McDev02

    McDev02

    Joined:
    Nov 22, 2010
    Posts:
    664
    VS Community FTW. I like to create custom templates. For instance shader presets or extensions of custom classes. E.g. my AI scripts all have the same structure so I make a template for them.
     
  10. ModLunar

    ModLunar

    Joined:
    Oct 16, 2016
    Posts:
    374
    Ooh that's a good idea, I should really do that :)
     
  11. TimothyGrant

    TimothyGrant

    Joined:
    Dec 9, 2013
    Posts:
    31
    Huge Rider fan here.
     
  12. starikcetin

    starikcetin

    Joined:
    Dec 7, 2017
    Posts:
    340
    On Windows as well?
     
  13. TimothyGrant

    TimothyGrant

    Joined:
    Dec 9, 2013
    Posts:
    31
    I've only ever used it on Windows.
     
  14. BrewNCode

    BrewNCode

    Joined:
    Feb 17, 2017
    Posts:
    372
    I switch from Mono develop to Visual Studio to VS Code. VS Code is SO MUCH BETTER than the latest 2. Is just no comparison. I love it. VS Code is something that Unity should integrate by default for Unity 2018.
     
  15. Sergey_Droba

    Sergey_Droba

    Joined:
    Nov 6, 2016
    Posts:
    52
    I love VS Code too, but i doubt Unity still support it. I still waiting for fixes about half year.
     
  16. Antony-Blackett

    Antony-Blackett

    Joined:
    Feb 15, 2011
    Posts:
    1,778
    VS Community (Mac) and VS are the only VS's I can get to be consistent across both platforms as well as being similar to MonoDev to help the transition.

    But for the life of me I wish they would get rid of the stupid control click -> go to definition function!
     
  17. BrewNCode

    BrewNCode

    Joined:
    Feb 17, 2017
    Posts:
    372
    I read a month ago, that Unity Spain, was giving the news about monodevelop not being supported anymore, and they actually RECOMMENDED VS, Sublime or VS Code. I don't think that is too hard to think about an integration.
     
  18. Sergey_Droba

    Sergey_Droba

    Joined:
    Nov 6, 2016
    Posts:
    52
    Thank you for information!
    I love in VS code because:
    - i can bind any action with key combination.
    - can find any command of the IDE through the search popup.
    - it works fast
    - Also it has smooth scrolling unlike VS for Mac and Rider. Also VS for mac looks freeze sometimes when trying to find code suggestion.
    Sublime looks similar to VS code, i will try it.
     
  19. BrewNCode

    BrewNCode

    Joined:
    Feb 17, 2017
    Posts:
    372
    CORRECT, if you use Sublime or VS code, you are into business.
     
  20. mikest

    mikest

    Joined:
    Feb 23, 2015
    Posts:
    29
    Just switched from MonoDevelop to VS Code on OSX and here are my thoughts so far:
    • code formatting/beautify is terrible on VSCode. Pasting snippets doesn't auto format. Pressing enter in a statement doesn't auto indent. If someone knows an extension that fixes this let me know
    • Strongly dislike the search in Code. I actually prefer the results on the bottom as MD did it because I generally use Split editing. The formatting of the results is also very odd.
    • Clicking on a search result for a line in a file that is already opened seems to open a new instance of the file rather than moving the pointer in the currently opened one. Probably there is a setting to turn this off but I don't see it.
    • Hate the F12 or right click goto def. much preferred cmd+d in MD
    • The MD cmd+b first pass build was really nice for refactoring because it would immediately show you all issues in a search results window. don't believe this is in VS Code. Please correct me if I am wrong.
    • I do like the code outline that displays in the right rail. Always liked that feature in Sublime.
    • Hated than MD crashed at least twice a day on OSX. Clearly some memory leak issues that were never addressed. That plus the recent announcements that Unity will stop shipping MD with 2018 led me to try VS Code.
    I will probably give Rider and Visual Studio Mac a look to see whether they fare better on the above the points as I don't think VS Code will work for me.
     
    afshin_a_1 likes this.
  21. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,967
    Most of your "issues" are just being used to monodevelop. A lot of things MD does no other IDE does, stuff like F12 for go to definition is pretty normal.

    Also Shift + Alt + F for format document :)
     
    samochreno and mikest like this.
  22. Dai-22

    Dai-22

    Joined:
    Jan 19, 2018
    Posts:
    130
    Honestly as a beginner, I would just like vs to link to unity api docs like mono-develop. Mine doesn't.
     
  23. starikcetin

    starikcetin

    Joined:
    Dec 7, 2017
    Posts:
    340
    It has been a long time since I last used MD, what do you mean by "to link to unity API docs"?
     
  24. mikest

    mikest

    Joined:
    Feb 23, 2015
    Posts:
    29
    Well, I am on a Mac and options are somewhat limited so I will admit I've gotten used to MD. I do think the things I mention are some of the positive features that MD has.

    I've been using Visual Studio Mac (just a rename of VS Community) and it's clearly based on MD because it works in much the same way, but without the crashing issues I had in MD. I think it's a good choice for Mac if you are used to MD.

    By all means, if you like working in a different way, then use a different tool. Isn't it really just about finding the most efficient way to work?
     
  25. NGC6543

    NGC6543

    Joined:
    Jun 3, 2015
    Posts:
    228
    Hey, I just updated VS community for mac few days ago(Ver.7.4 build 1033), and now my syntax highlighting doesn't work anymore. I migrated from Xamarin studio to VS community, and my xamarin's syntax highlight .json file worked well with VS community. My colleague who uses VS community also experiences the same problem, so at first I thought this was a bug. But I couldn't find other users who mentioned about this issue for more than a week.
    Is there any VS community users who are experincing the syntax highlighting issue after update?
     
  26. mikest

    mikest

    Joined:
    Feb 23, 2015
    Posts:
    29
    Yeah this happened to me too. It seems like it impacts the integrated themes because when I installed a custom one from https://studiostyl.es/ it worked fine. Probably a bug we should report.
     
    NGC6543 likes this.
  27. orb

    orb

    Joined:
    Nov 24, 2010
    Posts:
    3,037
    I use VSCode for Go (now supported in-house by MS), web stuff (the field where you'll find most extensions) and markdown documents (with a preview extension) anyway, so might as well use it for C#. VSC has format on save and go to definition for at least some languages, and it's just a matter of installing an extension (out of the box it doesn't even know C# exists).

    VSCode's configuration can easily be copied between systems and work on three platforms, so it's a nice way to keep things consistent if you switch around.

    I don't get why UT had to continue with what's basically a close cousin to the much-reviled MonoDevelop as the editor for macOS. A much better alternative already exists, created by the same company but with support for more languages.
     
  28. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,967
    Monodevelop is based on SharpDevelop which in turn is based on visual studio, so other way round! Also im on mac too, and have never found a feature that MD has that VS doesnt. But I have found many VS has that MD does not.
     
  29. mikest

    mikest

    Joined:
    Feb 23, 2015
    Posts:
    29
    Fair enough. My biggest gripe with VS Mac so far is that when you go "side by side" it has trouble knowing what tab is where. for instance, doing a "close others" when you moved a file to the other side will close file on the side the file started on.

    Otherwise, I like it fine and it's much more stable than MD (which crashed 1-2 times a day for me). I just couldn't get VSCode where I liked it as noted above. I'm sure I could probably work through those issues eventually but it didn't seem worth it.
     
  30. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,967
    Actually I agree about VS for mac, for some reason it is a very stripped down version of VS with a harder to use interface!

    Try VS code with the unity extensions and c# extensions, its really nice! (with ALOT of work though to set it up)
     
  31. starikcetin

    starikcetin

    Joined:
    Dec 7, 2017
    Posts:
    340
    I have switched to Rider from Visual Studio. It seems faster than Visual Studio + Resharper. I'm not sure if it is faster than vanilla Visual Studio though. I'll stick with it for a while to see how it goes.
     
  32. NGC6543

    NGC6543

    Joined:
    Jun 3, 2015
    Posts:
    228
    My colleague found that the issue was reported here. Temporary solution is to rollback to the prior version.
     
  33. Gaderblitz

    Gaderblitz

    Joined:
    Mar 19, 2018
    Posts:
    1
    I personally prefer Visual Studio, but if it is to make quick changes to the scripts I would use SublimeText, although Visual Studio is much better, it takes a while to load, SublimeText is very fast.
     
  34. darthbator

    darthbator

    Joined:
    Jan 21, 2012
    Posts:
    169
    Do you happen to know if there's something similar offered for Visual Studio on Mac OS. As of the latest update it no longer reads many of the fields from my old style and it's driving me crazy. It's substantially harder for me to read code without more granular control of syntax highlighting.
     
  35. PixelShenanigans

    PixelShenanigans

    Joined:
    Aug 19, 2015
    Posts:
    4
    Ctrl-Alt-M Ctrl-H
     
    sfaok and M_O_Marmalade like this.
  36. RxGian

    RxGian

    Joined:
    Mar 21, 2018
    Posts:
    82
    Visual studio code has complicated view and edit mode. I choose Visual Studio
     
  37. gputhread

    gputhread

    Joined:
    Dec 7, 2018
    Posts:
    36
    VS Code is faster then VS but I cant see code fix suggestions in VS Code, also VS Code sometimes show weird errors when running it without VS installed.
    #NoMercy_VisualStudioCummunityForUnity_Lags_16GB_1050TI_I57_w10

    Edit: vs code works fine after regenerate project files
     
    Last edited: Aug 3, 2021
    Siccity and R0man like this.
  38. UgandaBeAnS

    UgandaBeAnS

    Joined:
    Jan 8, 2021
    Posts:
    1
    But the thing is rider costs money and visual studio code is free and it has more doing launguages so you can use it with unreal as well so viscose is just better
     
  39. JustASheep

    JustASheep

    Joined:
    Aug 19, 2020
    Posts:
    1
    I have had Issus with code completion in vs code, such a shame too because I really love working in vs code when it works, but most of the time it doesn't work so I switched to visual studio.
     
  40. NotVeryGoodAtThs

    NotVeryGoodAtThs

    Joined:
    May 3, 2021
    Posts:
    8

    I like Visual Studio better solely because of it's compilation times and auto-formatting. However, I use JetBrains Rider because it's much more advanced than both of these. The autocomplete is far beyond anything Visual Studio or VSCode, there's refreshing in the Unity Editor itself. Rider is not free, though it does offer a trial, and I did find ways to reset it using a betch file that I found on GitHub. Hope my answer helps!
     

    Attached Files:

  41. gun_man

    gun_man

    Joined:
    Sep 19, 2020
    Posts:
    16
    recently use vscode for convenient and i love it. it was super light and faster in term open project code. i am no power user nor code master so i dont use "enterprise" feature on VS so that why. But i am curios what VS capable of beside vscode.
     
  42. gun_man

    gun_man

    Joined:
    Sep 19, 2020
    Posts:
    16
    Lol, gonna try it. Personally i have issue with jetbrain since inteliJ android studio. When Im just started my jorney to be programmer, i've got a lot problem with them since i dunno how to use it. The pain back then make me hate them for no F reason but gotta try this time. Thanks