Search Unity

VS Code and preprocessor defines

Discussion in 'Scripting' started by giorgos_gs, Aug 26, 2020.

  1. giorgos_gs

    giorgos_gs

    Joined:
    Apr 23, 2014
    Posts:
    623
    Hi,

    I now work with VS Code. Its great.
    I just have one missing feature if anyone knows how to fix it.
    I would like it to understand #if preprocessor definitions.
    EG: When I have some code like this and I work in Standalone Windows.
    Code (CSharp):
    1. #if UNITY_PS4
    2. //hello ps4
    3. #elif UNITY_STANDALONE
    4. //hello pc
    5. #endif
    It does not gray out the PS4 code.
    How can I do this?