Hello everyone.

The Mixed Reality Forums here are no longer being used or maintained.

There are a few other places we would like to direct you to for support, both from Microsoft and from the community.

The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.

For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.

If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.

And always feel free to hit us up on Twitter @MxdRealityDev.

Windows namespace in Unity editor

Hi, in Unity if I open a c# and use namespace such as Windows.Storage; Windows.Data.Json; it will show up as error and could not build VS project. How to handle this?

Answers

  • @Fireman if you use any of the more recent .NET api in your UWP app that are not supported in the older mono versions of .NET that are used in the Unity editor you can surround your logic with compiler directives

    #if !UNITY_EDITOR
    
    //api calls requiring newer .NET support than the Unity Editor
    
    #endif
    

    The code wrapped in the directives will then be ignored by Unity and should not throw an error.

    HTH

    Windows Holographic User Group Redmond

    WinHUGR.org - - - - - - - - - - - - - - - - - - @WinHUGR
    WinHUGR YouTube Channel -- live streamed meetings

Sign In or Register to comment.