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.
Enabling BLE in Hololens App
Hi:
I'm using BLE in my Hololens app, so I need to include
using Windows.Devices.Bluetooth.Advertisement;
to access the functionality from the C# scripts, but it seems the namespace Devices is not found. Do I have to include any other assembly?
In Unity3D -> ProjectSetting->Player-> Capabilities I already checked Bluetooth option, but it seems something else is required...
Thanks
Gus
Best Answers
-
OptionsHoloSheep mod
Have you tried adding:
#if WINDOWS_UWP using Windows.Devices.Bluetooth.Advertisement; #endif
to the UWP project in Visual Studio after building your project from Unity?
Windows Holographic User Group Redmond
WinHUGR.org - - - - - - - - - - - - - - - - - - @WinHUGR
WinHUGR YouTube Channel -- live streamed meetings5 -
OptionsHoloSheep mod
Bottom line Unity uses a flavor of Mono for its .NET support which is currently based on an earlier version of .Net libraries.
UWP uses a newer version of .Net libraries and also a subset specific to the Universal Windows Platform.
Here is a spot in the Unity docs that touch on the subject.
Windows Holographic User Group Redmond
WinHUGR.org - - - - - - - - - - - - - - - - - - @WinHUGR
WinHUGR YouTube Channel -- live streamed meetings5
Answers
@gussabina
Have you tried adding:
to the UWP project in Visual Studio after building your project from Unity?
Windows Holographic User Group Redmond
WinHUGR.org - - - - - - - - - - - - - - - - - - @WinHUGR
WinHUGR YouTube Channel -- live streamed meetings
Hi HoloSheep:
Thanks for the answer.
Indeed this solved the problem, although it should be written in any single line which use the reference. It could be tedious.
Just after I posted the question, I realized that after building the project from Unity, VS doesn't longer complain for this error. The problem is Unity still complains and doesn't allow going to Play mode. Again, using this conditional, solves the problem.
I'm wondering why Unity is not aware of this. Isn't there any way to include this Windows.Device namespace from Unity?
Thanks
Gus
@gussabina
Bottom line Unity uses a flavor of Mono for its .NET support which is currently based on an earlier version of .Net libraries.
UWP uses a newer version of .Net libraries and also a subset specific to the Universal Windows Platform.
Here is a spot in the Unity docs that touch on the subject.
Windows Holographic User Group Redmond
WinHUGR.org - - - - - - - - - - - - - - - - - - @WinHUGR
WinHUGR YouTube Channel -- live streamed meetings