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

A big THANK YOU to UT for the VS Code integration!

Discussion in 'General Discussion' started by AmazingRuss, Sep 7, 2017.

  1. AmazingRuss

    AmazingRuss

    Joined:
    May 25, 2008
    Posts:
    933
    This is SO nice. Has really revitalized my Unity experience.

    THANKS!
     
    angrypenguin and Dustin-Horne like this.
  2. Meltdown

    Meltdown

    Joined:
    Oct 13, 2010
    Posts:
    5,816
    Nice, now invest in Resharper next, it will change your life.
     
  3. sxa

    sxa

    Joined:
    Aug 8, 2014
    Posts:
    741
    JetBrains keep saying they wont support Resharper on VSCode. They're pushing people at Rider instead.
     
  4. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    What is the value of resharper? I'm not actually having any problems I know of. Is it meant to enforce a code style on you?
     
  5. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,533
    I'd like vscode more if the scrollmap stuff they finally added in 2017, actually worked as well as the Visual Studio's own code scrollmap.. its like how the F*** did the same company (MS) screw that up with an even flaky half baked implementation with piss all options..that isn't even as good as Visual Studios. Also the debugging stuff in VSCode isn't as good, a bit rough really.

    Other than that maybe Unity should make it easier to choose which editor you want to use.. I still prefere to use Visual Studio for projects, but I can see the benefit of opening up some other projects in Unity and wanting to have the code files load up in VScode instead (just because it does loadup considerably quicker and Unity refuse to bother improving the code inspector to show more than a couple of hundred lines before showing the useless <...etc...> line let alone simple quick in editor code editing).. but right now it means going to preferences to set the default code editor.. when a simple context menu to 'open with' (chosen editor) would be much faster and that should set the default editor for that project.
     
  6. Meltdown

    Meltdown

    Joined:
    Oct 13, 2010
    Posts:
    5,816
    Its got tons of keyboard shortcuts and finding/editing/generating/refactoring code features that just make you a more efficient programmer. They also take some crappy VS features, such as code snippets and add their own version of it which is so much better.

    Once you get used to working with it you'll look back and wonder how you got on all these years without it.
     
    mysticfall and hippocoder like this.
  7. mysticfall

    mysticfall

    Joined:
    Aug 9, 2016
    Posts:
    649
    I haven't used VS + Resharper myself, but from my understanding that it has almost the same features as Rider, I can say that I pretty much learned C# by following its instructions.

    It took me almost zero overhead when I switched from Java to C#, and again to C# 7 thanks to Rider, because whenever I write some statements that reveal my habbit of writing old style Java or pre C# 7 code, it instructed me why such lines are not ideal and suggested various ways to improve them which I can apply with a single mouse click.

    And as @Meltdown suggested, it also supports tons of very useful shortcuts and features that can boost productivity. I was already familiar with them from using IntelliJ(another IDE from the same company) for a while, so even though I haven't written any C# code before I started using it for Unity, it made me feel like I've been always using it.

    I often have to open source code of existing Assets to debug my project, and whenever I do that, I realize how much it has helped me to write a better code, since most of the time it shows tons of inspection warnings for such sources which means they might have been improved further if they were written using Rider (or ReSharper).

    I admit that I might sound like a fanboy, since I love using IntelliJ and I even got a free open source license of Rider. But I believe their products can really help you become a better programmer and make coding feel like a breeze.
     
    Last edited: Sep 11, 2017
  8. spacefrog

    spacefrog

    Joined:
    Jun 14, 2009
    Posts:
    734
    Pardon me, but is VS Code still not able to interpret #define ? Given the broad use of unity version/platform etc... in unity projects VS Code appears just unusable for me
    https://github.com/OmniSharp/omnisharp-vscode/issues/1018

    or did i miss some custom unity wizardy for VS Code ?
     
  9. spacefrog

    spacefrog

    Joined:
    Jun 14, 2009
    Posts:
    734
    Can anyone confirm/disprove my asumption, that VS Code still does'nt work with #define and other preprocessor directives ?
    I tested in plain c# , and even there, if you enclose some code inbetween some #if RANDOM_SYMBOL ... #endif clause, the code still always stays visible to intellisense, no matter whether RANDOM_SYMBOL is known/defined or not. On top of that, all the well known UNITY_5 etc.. defines are unkown to intellisense whith vs code being used as unity code editor ...
     
  10. ikazrima

    ikazrima

    Joined:
    Feb 11, 2014
    Posts:
    320
    You mean this? Works for me. Screen Shot 2017-09-14 at 2.54.24 PM.png
     
    spacefrog likes this.
  11. spacefrog

    spacefrog

    Joined:
    Jun 14, 2009
    Posts:
    734
    Hey thanks Ikazrima
    Yes - exactly this. Problem is, that i cant get intellisense for c# #defines to work at all here in VS Code. This is even true for plain c# projects i tested, independent from unity. I already completely wiped the whole vs code installation, including all config files and caches it scatters across all user folders ( .vscode / Code user subfolders ) to no avail
    But your post at least gives me hope, i guess i will give it another test

    BTW: maybe it has something to do that i have had vs code insider installed , back from the day when vs code appeared first tinme ( guess this was late 2016 )
     
    tokar_dev likes this.