Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Other Visual Studio and VScode, which one is better for Unity?

Discussion in 'Code Editors & IDEs' started by FSXplay, Mar 9, 2022.

  1. FSXplay

    FSXplay

    Joined:
    Oct 25, 2021
    Posts:
    8
    I've used Visual Studio and VScode and find that the intelisense in VScode works much faster than Visual Studio. I know that Visual Studio and VScode are different, one is an IDE and one is a code editor. The problem here is which one is better for Unity and why are there so many people using Visual Studio than VScode to write scripts in Unity.
     
  2. Xarbrough

    Xarbrough

    Joined:
    Dec 11, 2014
    Posts:
    1,188
    A matter of politics, preference and budget. Visual Studio has all the features you would need, it's even free for non-commercial work and Microsoft does a good job of catching everybody in their net. Rider has arguably even better features (for refactoring and debugging Unity projects specifically), but it comes at a higher price point. VSCode is something completely different, as it focuses on script editing in environments like the web or on-the-fly Python scripts. Personally, I miss quite a few refactoring and debugging features in VSCode, but it's also much faster, lightweight, and maybe easier to use for certain use-cases. It's also currently free.

    Best, try out the demos of all of them and look at videos to get a feel, but if you can't decide, take my opinions:
    - Use VisualStudio if you're a full-time programmer or your company has a deal with Microsoft
    - Use Rider if you're picky and want to spend money for a more polished experience (very subjective, no need to argue)
    - Use VSCode if you're a tech artist who writes the occasional script
    - Use any other IDE or text editor if you like to spend time researching tools instead of coding :p
     
    FSXplay likes this.
  3. SirIntruder

    SirIntruder

    Joined:
    Aug 16, 2013
    Posts:
    49
    A lot of people at my work swear by Rider - once people get used to it, they never go back to VSCode/VS. So statistically speaking, I assume you will like it too, if you can't handle the price tag :) FWIW it has some nice Unity specific tricks and it's continuously improving.

    Well, I'm a rare heavy-duty programmer who chooses VSCode over VS/Rider, so you may find my reasoning interesting:
    - VS/Rider have edge over VSCode in c#-specific stuff; but VSCode (imho) has edge over them in "general" stuff: code editing, git integration, integrated terminal, UI. (check out GitGraph extension btw, it's amazing)
    - VSCode feels more snappy and streamlined to me - and VS/Rider feel slow and bloated, and distract me from the actual code.
    - Editing non-c# files in vscode is very natural and nice - I actually frequently edit/search various yaml files in vscode directly, for various reasons.

    The main issue with VSCode+Unity though: VSCode's support for Unity is a step-child to their .Net-Core project support, and Unity's support for VSCode is treated as a step-child to their VS/Rider support. So don't be surprised if things start breaking when something updates and you have to google how to fix it.

    There is a saying of "VS is IDE, VSCode is a text editor", but truth of the matter is, C# extension for VSCode is technically close to full feature parity with VS, for the business of editing/refactoring/analysing c# code. Caveat 1 - it's really janky for the more advanced stuff and caveat 2 - it doesn't have "enterprisy IDE" extras (like VS' performance analyzer), but it's kind of irrelevant for Unity projects.
     
    FSXplay likes this.
  4. Dragon_Trek707

    Dragon_Trek707

    Joined:
    Jun 16, 2023
    Posts:
    1
    I use VSCode, as it is free and customizable. I prefer this because it recognizes each C# keywords unlike Visual Studio which tends to not recognize keywords and cause Compiler errors.
     
  5. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,714
  6. Laicasaane

    Laicasaane

    Joined:
    Apr 15, 2015
    Posts:
    394
    After some days, the situation has changed.