Search Unity

NETFX_CORE not defined, even though conditions are met

Discussion in 'Windows' started by DinostabOMG, Feb 26, 2019.

  1. DinostabOMG

    DinostabOMG

    Joined:
    Jan 4, 2014
    Posts:
    26
    The documentation has this to say about the NETFX_CORE conditional:

    > NETFX_CORE is defined when compiling C# files against .NET Core and using .NET scripting backend

    Here are the settings I am using for this build:

    upload_2019-2-26_17-27-2.png

    upload_2019-2-26_17-24-16.png

    Despite this, it seems that the NETFX_CORE is still undefined in the code.

    upload_2019-2-26_17-30-24.png

    What am I missing?
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    It's only defined when you build the player. It's not going to be defined in the editor.
     
  3. DinostabOMG

    DinostabOMG

    Joined:
    Jan 4, 2014
    Posts:
    26
    Thanks for the reply. That is going to make writing for it pretty cumbersome... I suppose I'll have to mock all the Windows classes I need.