Search Unity

VSCode: state of #define / symbol defines ?

Discussion in 'General Discussion' started by spacefrog, May 17, 2019.

  1. spacefrog

    spacefrog

    Joined:
    Jun 14, 2009
    Posts:
    734
    I very much love the slickness of VS Code, but until now i held back from using it for my Unity development, because AFAIK it does not support / respect #if SYMBOL_DEFINED conditional compilation and syntac coloring etc.. inside the editor .
    Maybe i understand this wrong , but how are you supposed to write code for multiple platforms ( iOS / ANDROID etc.. ) if such a basic feature is missing ? Or is it not ?

    Please no recommendations to use Rider etc... or anything similar like that its a limitation of the omnisharp thingy at the back of the c# extension of VS Code, those are all the things one can learn from google already

    I just wanted to know if i miss something obvious here, that would enable me to use #define and #if / #endif the usual way with VS Code, inside the code editor like i used to be able with Monodevelop or VS itself ...
    Thanks for everyone answering this question :)
     
  2. spacefrog

    spacefrog

    Joined:
    Jun 14, 2009
    Posts:
    734
    Hmm .. there have to be some people using VS Code together with Unity who have more insight on the state of the #define situation ... Please step out of the shadow :)
     
  3. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,190
  4. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,533
    MS are too busy supporting the javascrap/typescrap developers to bother implementing such c# features.

    Hell they suck so much they still haven't event got mousewheel tab support, and only the S***ty tabbar scroll feature instead of multiline tabbar, even though someone else patched it in and provided the effing the fix, they still can't even be bothered to put it in a release.
     
  5. spacefrog

    spacefrog

    Joined:
    Jun 14, 2009
    Posts:
    734
    thanks for digging that up, but I don't need #region support that urgently
    I'm after #define support, to see which code parts get compiled/used with various #defines in the source code.
    As far i understood the extension in your posted link only introduces folding for #region blocks ... nothing more
     
  6. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,190
    Ah. I don't know why I read #define as #region. :p
     
  7. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,533
  8. spacefrog

    spacefrog

    Joined:
    Jun 14, 2009
    Posts:
    734
    ViveSoftware and MarkHenryC like this.