Search Unity

.NET 4.x for UWP Target Platform not working

Discussion in 'Scripting' started by DHein, Jul 2, 2018.

  1. DHein

    DHein

    Joined:
    Jan 26, 2016
    Posts:
    38
    Hello,

    I have encountered a problem when using the #define directives for UWP.
    Using the following code while targeting the UWP platform, execution in the Playmode of the Unity Editor leads to a false condition, so the code is not executed.

    Code (CSharp):
    1. #if NET_4_6 || NET_STANDARD_2_0
    The Scripting Backend and API Level settings are all set properly to .NET 4.x.
    I am also using the latest VS 2017 version as well as Unity 2018.1.6f1.
    Switching to the Windows platform fixes this.

    Is this known behaviour, meaning that 4.x is not used in the Unity Editor when targeting UWP?

    Any help or insights would be appreciated!