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.
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
Can I acces to my Hololens ID ?
Hello, I am working with two hololens and developing with Unity.
I need to know with which hololens I am working via script once I am running my app. They have any identifier???
Thanks a lot!
Tagged:
0
Best Answers
-
OptionsXarthisius ✭✭
You can use EasClientDeviceInformation class.
using Windows.Security.ExchangeActiveSyncProvisioning;
var info = new EasClientDeviceInformation();
Debug.Log(info.FriendlyName);
Debug.Log(info.Id);6 -
OptionsXarthisius ✭✭
You can connect Hololens to PC via USB and run app on device. Debug.Log messages will be shown in output view.
2
Answers
You can use EasClientDeviceInformation class.
using Windows.Security.ExchangeActiveSyncProvisioning;
var info = new EasClientDeviceInformation();
Debug.Log(info.FriendlyName);
Debug.Log(info.Id);
Thank you for your answer.
I have this issue:
The type or namespace name 'Windows' could not be found (are you missing a using directive or an assembly reference?)
Unity cannot recognize that code. You have to use it like this:
#if WINDOWS_UWP
using Windows.Security.ExchangeActiveSyncProvisioning;
#endif
#if WINDOWS_UWP
var info = new EasClientDeviceInformation();
Debug.Log(info.FriendlyName);
Debug.Log(info.Id);
#endif
Unity will not execute this code, but when you run app on hololens, it will be executed.
Thak you a lot for your answers.
There is one thing I couldn't understand.
If this code have to execute only in hololens, how can you see debug logs??
If you can help me with this issue you would help me a lot.
Where can I see debug logs, when I am running app in hololens
You can connect Hololens to PC via USB and run app on device. Debug.Log messages will be shown in output view.
Thank you a lot!