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.
Options

Using .NET 4.6 features not supported by Unity WSA Build

We are facing an issue trying to use .NET 4.6.1  System.Numerics.Vectors in a HoloLens app. An UWP API we are calling is returning a System.Numerics.Vectors  Vector2 and Vector3.

To be clear, the code is only enabled for the UWP/WSA platform, so disabled in the Editor Mono runtime itself, using #if NETFX_CORE
Still it fails during Build for WSA UWP 10 HoloLens in Unity:
"Reference rewriter: Error: method System.Numerics.Vector2 Windows.Media.Devices.Core.CameraIntrinsics::get_FocalLength() doesn't exist in target framework "

I assume this is because the WinRT / UWP / WSA target in Unity does not use .Net 4.6.1 yet. We tried with Unity 5.5 and 5.6.

The workaround for now was to comment out the code in the script for Unity build and then to uncomment in VS when it's actually build for the HL.
But that is not a great workflow at all, so what is the best way to enable that? 

We also tried to use the System.Numerics.Vectors  NuGet package PCL DLL in Assets\Plugins which works in Unity but then fails during actual build in VS due to duplicate references. No surprise.

Another idea would be to make an extra .Net DLL only with that code pieces using System.Numerics.Vectors and then to include that DLL in Assets\Plugins\WSA so Unity does not process the DLL further during its build. But that's not a great approach.

Tagged:
Sign In or Register to comment.