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

Use intellisense with preprocessor directive #if NETFX_CORE

Discussion in 'Windows' started by Bocci, Dec 12, 2019.

  1. Bocci

    Bocci

    Joined:
    Sep 7, 2013
    Posts:
    15
    I'm developing for UWP with VS2019, in order to use the windows.storage API I need to use the
    #if NETFX_CORE preprocessor directive.

    netfx_corePPD.JPG

    This makes the code inaccessible for Intellisense (greyed out). When building for .NET scripting backend we could open the builded project and edit the code from there, since it was still C#. But with il2cpp this is not possible anymore (2019.2).

    So as much as I like the challenge to write code without Intellisense, there is a way to enable the support directly inside the Unity project?

    Thanks
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,645
    You're using the wrong define. NETFX_CORE is not defined on IL2CPP. What you want is "#if UNITY_WSA && ENABLE_WINMD_SUPPORT".