Search Unity

Benefits of VisualStudio over VisualStudio Code?

Discussion in 'Scripting' started by DeepShader, Oct 12, 2021.

  1. DeepShader

    DeepShader

    Joined:
    May 29, 2009
    Posts:
    682
    Hi there,
    what are the benefits of VisualStudio over VisualStudio Code when using Unity?

    I mean is there a good reason why Unity still comes with VisualStudio instead of VS Code, which is much faster and more lightweight?

    Maybe someone can help me to understand it :D

    Thank you ^_^/
     
  2. Deleted User

    Deleted User

    Guest

    Visual Studio is the one to use if you are on Windows, the others are for Mac and Linux and they suck.
     
  3. DeepShader

    DeepShader

    Joined:
    May 29, 2009
    Posts:
    682
    I'm on a Mac and Unity comes with VisualStudio for Mac (formerly MonoDevelop) :p

    If I want to use VS Code I've to install it manually. That's why I'm asking why Unit still comes with VS instead of VS Code. So maybe there are some benefits to use VS over VS Code with Unity ^^'
     
  4. davidnibi

    davidnibi

    Joined:
    Dec 19, 2012
    Posts:
    426
    Have used Visual Studio Code for years - it's totally suitable if all you are doing is coding C# and C++, VD is fully featured out of the box, VSC can be extended using add-ons.
     
  5. DeepShader

    DeepShader

    Joined:
    May 29, 2009
    Posts:
    682
    So you would say the only difference is that VS come with everything build in, what makes it slow and VS Code is lightweight but need add-ons to get the functions you need/want?
     
  6. lordofduct

    lordofduct

    Joined:
    Oct 3, 2011
    Posts:
    8,537
    the names here are going to get confusing and your OS makes a big difference here

    Visual Studio (Windows) - a full IDE (integrated development environment) with robust enterprise level bells and whistles. There are many features built into Visual Studio that VS Code does not have (either you have to set them up piece meal, or they don't exist period). Thing is most of the features the VS Code doesn't have aren't really necessary in Unity.

    Visual Studio for Mac (Mac) - a full IDE based on the old MonoDevelop. It too is a full IDE with robust enterprise level bells and whistles. It is also glitchy as all hell. I am not a fan... but its purpose is very similar to Visual Studio on Windows.

    Visual Studio Code - A lightweight, cross-platform, "code editor". The key word here being the "lightweight" aspect. This makes it speedier to run, but at the expense of a smaller feature set. You can add many, but not all, of the features from more robust IDEs like Visual Studio through the extensions. But this requires setting them up and also adds more bloat to the application bringing its lightweight performance down.

    ...

    Any one person's preference for each is just that... it's a preference.

    I won't poo poo VSCode or Visual Studio... well... I'll poo poo Visual Studio for Mac because come on guys... it's buggy as all hell.

    But regardless... that's just opinion. And any of our opinions don't actually matter into the "why" Unity makes decisions internally.

    Note that OP's question really only applies to Mac and not Windows since Visual Studio Community Edition (free version of VS for windows) is what is included in the Windows install. I honestly don't know what the linux version comes with.

    ...

    So why does Unity include Visual Studio for Mac in the Mac version of Unity?

    We can mostly only guess!

    I can think of a few reasons off the top of my head:

    1) The big one - there is a no redistribution clause in the Visual Studio Code license... so right there, they can't legally do it. Technically Unity could take the open-source code of Visual Studio Code and build it itself and distribute that (since the source code is under MIT license), but the actual binaries from Microsoft are not.

    2) It's a support nuisance for Unity - note that building VSCode themselves would mean they'd have to support that directly since it's their build. Or lets say VSCode was distributable (they are partnered with MS so getting an exception wouldn't be super difficult), but VSCode doesn't work out of the box with Unity, it requires multiple extensions installed to work as well. There is a lengthy guide for setting it up: https://code.visualstudio.com/docs/other/unity

    Unity wants something that installs and goes. So they'd have to write up a special installer that did all of this for you... which again comes with support/dev costs/issues. And... I have no idea what licensing issues that could intersect with since each extension has their own license too.

    3) Legacy - it's just the way it's been since before VSCode was as viable an option it is today. Unity has used MonoDevelop since the beginning... they only dropped it on Windows after parterning with MS. And MonoDevelop on mac turned into VS for Mac because MS also took over that, so really my including VS for Mac you're really just using the latest version of MonoDevelop. Why fix what ain't broke?

    4) Microsoft? - who knows... maybe MS in an effort to support their Visual Studio for Mac branding prefers that Unity uses that one and won't make an exception in the VSCode license.

    5) Sunk cost - maybe Unity has tools developed in VS for Mac (internally or not). Maybe they have a hard time justifying the cost to some board of directors if they were to drop it.

    6) Some guy on the board at Unity just really really likes VS for Mac. We don't know... we don't work there.

    ...

    What is it?

    The only people that know are the people who make those decisions at Unity. And I suspect IF they even bothered to grace us with that information it would be heavily filtered through PR that it likely isn't the actual real answer as to why.
     
  7. lordofduct

    lordofduct

    Joined:
    Oct 3, 2011
    Posts:
    8,537
    Thing is... at the end of the day. Unity is a company with private details internally.

    People often come here hoping to get an answer as to why Unity does this or that. And a lot of the time... it's because that's how they do it. That's it. We don't get more information than that for some of these types of things.

    And that's how most companies are.

    I've worked for various enterprise companies over the years and the reasons we do things certain ways are "because". Hell half the people in the company don't even know... they just do it that way because that's the way you do it.

    For example there is almost always this "guy", I call them "producers" because in some companies that's what their title will be, but in other companies they may have a completely different role like "head of sales" or something. But there's always this "guy" who says he knows what the customers want... but doesn't. But he has clout because who knows why... married to the owner's daughter, been their since the beginning, biggest earner in sales, makes up numbers/statistics and puts them in pretty graphs to show the execs... whatever it is... he has it.

    And this guy is the bane of my existence.

    I see them coming every time I start a new job. Sitting in a dev planning meeting, this guy walks in. He has his little black moleskine, he's older, wears leather shoes despite the casual atmosphere of the office. And even though we're 1 week from a version release he demands some new bizarre feature to be added to the list or we ain't shipping.

    Which clearly we're not shipping since any new feature comes with more than a week of testing.

    The worst part with these guys... and why they're the bane of my existence. I end up being the one to write said feature, he complains that it's not to his liking since he's since changed the design spec from what I've given, so I rewrite it... then when it's done and released and no one likes it or the thing doesn't actually work the way people expect to (it's not buggy, it's just not designed correctly)... whose fault is it?

    Mine.

    Cause I'm the engineer who wrote it! I should have known that the spec wasn't correct and fought this guy with tenure on it risking my job. Damned if you do, damned if you don't.

    ...

    Every company has these people. Usually several of them.

    They even have customers like this. My current company I work at has one of these. They just gave us millions of dollars so that we can hire on 5 new devs that will work exclusively on features for them over the next few years. These features will be in the product despite the fact that no other customer asked for them.

    And if you asked us publicly why this feature was added... we sure as hell ain't going to tell you that this multi-national conglomerate paid us to. But instead say something like "through market testing we have determined these feature sets would make for a more productive experience with our core product".

    Not saying Unity is egregious in this respect. Who knows they may have a far less toxic work environment.

    But i guarantee you there's some of it there. There's some people/customer/whomever who gets their way because raisins. Because every company does. Some are overt and terrible (looks at Blizzard), some are mild and annoying (looks at my own company), and some are timid in it. But I've never in my life seen a company devoid of it completely.
     
    Last edited: Oct 12, 2021
    JasonBricco likes this.
  8. DeepShader

    DeepShader

    Joined:
    May 29, 2009
    Posts:
    682

    Thank you for your detailed opinion :)

    Ok, so VisualStudio Windows isn't comparable with VisualStudio for Mac because only the name is the same, but that's all and the Mac version is really buggy.

    That would mean a Mac user would have a much better life with VisualStudio Code or something like Script Inspector 3 / Super Editor Pro (both Assets which are script-editors inside of Unity) or Rider instead of the buggy VisualStudio for Mac aka MonoDevelop or would there something I will be missing (maybe some important feature which I'll only get with VS for Mac / MonoDevelop because of it's integration with Unity)?


    And I think it's nr. 4 - Microsoft ;)
     
  9. lordofduct

    lordofduct

    Joined:
    Oct 3, 2011
    Posts:
    8,537
    Better off is subjective. I called it buggy because that's my opinion. Other people might not think of it as buggy as I do. I mean it's not like any of the tools I prefer haven't crashed either.

    Use the tool that works best for you.

    I don't necessarily know what tools VS for Mac has that you may need that VSCode doesn't have. I can think of tools that I need that VSCode doesn't have... but I do a lot more than general Unity development.

    I have both Visual Studio and VSCode (I use Visual Studio in windows, and I use VSCode in linux). I will say I find VSCode very fast, but I also find its configuration a nuisance. It relies heavily on me knowing the magic path to this file or that to configure this project versus that project. Which is mostly fine if all my projects are identical in context (like all websites, or all unity projects). But I can't remember how to setup a project in VSCode for every type of project I do... instead I have to either a) look it up or b) use some extension that does the magic for me... and I hate magic.

    Mind you... in time I get more and more familiar with it as does anyone with any piece of software they use.

    But I would argue getting Visual Studio up and running with Unity is IMHO easier...

    but that's my opinion... it's subjective.

    So would someone be better off with say Rider or Script Inspector 3? Sure... maybe... if they prefer those tools. I don't know how well they integrate with Unity as I never used them, but if they come with the bells and whistles that make life easy for them, then sure.

    But that's subjective.

    Yes... because MS is always the bad guy...

    Sorry... M$

    Is it the 90s still where MS monopolized the market? Cause last time I checked Apple is the most valuable company in the world who is embroiled in lawsuits for monopolizing their markets.
     
  10. Yes, use Rider. (sorry) :D
     
    PanthenEye likes this.
  11. DeepShader

    DeepShader

    Joined:
    May 29, 2009
    Posts:
    682
    Haha, why sorry and what are the benefits of Rider over the rest (on macOS)?
     
  12. I'm lazy. It gives me everything under my fingertips. It forces me to adhere to my own rules (configurable code styling and even logic). It's not that slow like the VS, it's not that fragmented like VSC (and typing in Rider isn't like I'm typing on a website like in VSC). The overall thinking behind almost every feature (don't get me wrong, I have open tickets on the Rider bug-system) just gives a comfortable environment, so you need think only about your code, not the menu system where you can find stuff and where you should click.

    In exchange it is not free. And it may be a problem for some. But you can try it for free and if it doesn't worth it to you, that's okay. I tried it for free, after a week I was a subscriber (it was several years ago).
     
    Nefisto likes this.
  13. DeepShader

    DeepShader

    Joined:
    May 29, 2009
    Posts:
    682
    That sounds very cool. I think I've to give Rider a try :D

    What do you mean by "feels like typing ob a website"?
     
  14. VSC has a typing delay. I haven't measured how much, but I noticed and it bothers me. It feels like you are typing in a textbox on a website with heavy JS presence. It's annoyingly delayed.
     
    lordofduct likes this.
  15. lordofduct

    lordofduct

    Joined:
    Oct 3, 2011
    Posts:
    8,537
    Yep, can attest to that very slight delay.

    It's like trying to play old school arcade style games on a cheap HDMI tv. The input delay between pressing a button and it occurring on screen due to the analog to digital to display conversions.

    Just in the case of websites/VSC is due to like @Lurking-Ninja said... a heavy JS presence. Because the Javascript is reading and mutating those strings as you type. Which makes sense since VSCode is written in typescript.

    Not a huge deal when I'm typing here in the browser for forum posts. But when I'm writing code it... over time it starts to feel floaty. Since when I'm writing code I'm typing a lot more at a higher typing speed... where as in the browser I'm typing shorter and slower because it's just English.
     
  16. DeepShader

    DeepShader

    Joined:
    May 29, 2009
    Posts:
    682
    I just tried Rider on my Mac mini M1 with 16GB in Apple Silicon native code (=without Rosetta) and damn is it slow It takes up to 25 seconds after clicking on a script in Unity to open everything. That's truly no fun. I think Rider isn't my solution.

    I'll give ScriptInspector and Super Editor Pro a try ^_^
     
  17. DeepShader

    DeepShader

    Joined:
    May 29, 2009
    Posts:
    682
    I noticed the same delay in Rider which seems also written in some Multiplatform framework instead of something native -.-
     
  18. You won't be happy with any IDEs if that's slow for you. Try Notepad++ or some script editor, not IDE. You open IDE once and leave it open for the entire session.
    I'm a Windows user, on Windows, it is not present in Rider but it is in VSC. Your mileage may vary I guess.
     
  19. DeepShader

    DeepShader

    Joined:
    May 29, 2009
    Posts:
    682
    Maybe I should give Rider another try to see the benefits of it while coding.

    What would you say is/are the biggest benefits for you using Rider instead of a editor with Unity?
     
  20. lordofduct

    lordofduct

    Joined:
    Oct 3, 2011
    Posts:
    8,537
    This, all this.

    The topic of "speed" of opening an IDE has always confused me.

    Visual Studio is... just open for me. It's always open. I launch Unity, I launch Visual Studio, and they're there until I restart my computer.
    upload_2021-10-13_12-33-52.png

    That's my windows machine at any time (I run both linux and windows side by side... windows is for Unity dev and gaming, linux is my daily driver). The number of VS instances open depends on how many different projects I'm working at that moment.
     
  21. DeepShader

    DeepShader

    Joined:
    May 29, 2009
    Posts:
    682
    In my case it's "ok" for me if it takes up to 25 seconds to open Rider for the first time, but when it's open it has to be fast and snappy and this wasn't the case in my test.

    But I think I should take some more time for a real test. Maybe there where some background tasks in progress or something else that slows down the first minutes.
     
  22. Debug, styling, in case of Rider it enforces code style and rules through warnings and errors. Check out the styling rules in the settings. It also brings the auto complete to the next level.
    Also it help with explanation why it recommends stuff. You can change a one-liner method into expression method with a keystroke and back. And those things.
    It also contains git (version control) client, so you can submit your changes into your repo right away.
    Also refactoring: hit F2 (on Windows) and rename a public variable. It will rename (if you want) all of the references to this variable in any other scripts as well.

    All sorts of things.

    Look at the status bar after start, it takes some time to load up all the rulesets and plugins.
     
  23. davidnibi

    davidnibi

    Joined:
    Dec 19, 2012
    Posts:
    426
    I think so - I've found VS Code suits what I do, you don't have to log in or have an account, and I'vee added the few things I've needed. Studio suits a fully fledged studio game effort, etc I think, though some people find use in it on personal projects.