Search Unity

Question Code under #if WINDOWS_UWP is greyed out in Visual Studio

Discussion in 'Windows' started by Moebot, Feb 17, 2021.

  1. Moebot

    Moebot

    Joined:
    Dec 8, 2020
    Posts:
    2
    Hi there,

    I am developing for HoloLens 2 with Unity + Visual Studio. The project is set up correctly as described in the Microsoft Mixed Reality docs (i have already deployed the app multiple times), the Build Platform is set to Universal Windows Platform.

    Some of the packages I am using have scripts with the WINDOWS_UWP directive. All the code inside this block is greyed out. This makes it impossible to write any code or fix bugs.

    Can someone explain to me whats wrong here?

    There is already a similar post, but the only answer is no solution and doesn't explain anything:
    https://forum.unity.com/threads/eve...ven-though-build-settings-targets-uwp.957251/

    Unity 2019.4.16f1
    Visual Studio Enterprise 2019 16.8.5

    Any help would be much appreciated.
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
  3. Moebot

    Moebot

    Joined:
    Dec 8, 2020
    Posts:
    2