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.
How to connect HoloLens application with a pc application through network?
I am working on a project in unity and I want to create two different applications(HoloLens & pc application) which those two applications connect over the network. The pc application gui will have buttons and if I press on the button, it will request the HoloLens application to do a specific task (TextToSpeech to say something). I am inexperience to coding and networking between applications and I have stumble with this problem for a long time now. It would be a very great help if anyone can give me a detailed answer or a walk-through to do this task. Thanks.
Best Answer
-
stepan_stulov ✭✭✭
Hey, @Sopheareach_Te
You will need to learn about Unity networking (aka UNET) but generally you will require these three classes:
NetworkDiscovery
NetworkServer
NetworkClientThe basic concept is that your PC app will start being discovered over LAN network and also will start a server listen. Your HoloLens app will use the discovery to find the server (its address) and will initialize its client to connect to the found server. Once the connection is established you will be able to send messages (like the text of your TextToSpeech) both ways.
UNET is just one option and something I'd recommend to start with. There are plenty of alternative networking frameworks like the one from HoloToolkit, Photon Networking or maybe even your own one.
Let us know where on the way to sending your first network message you've stumbled upon a problem.
Hope this helps.
Building the future of holographic navigation. We're hiring.
6
Answers
Hey, @Sopheareach_Te
You will need to learn about Unity networking (aka UNET) but generally you will require these three classes:
NetworkDiscovery
NetworkServer
NetworkClient
The basic concept is that your PC app will start being discovered over LAN network and also will start a server listen. Your HoloLens app will use the discovery to find the server (its address) and will initialize its client to connect to the found server. Once the connection is established you will be able to send messages (like the text of your TextToSpeech) both ways.
UNET is just one option and something I'd recommend to start with. There are plenty of alternative networking frameworks like the one from HoloToolkit, Photon Networking or maybe even your own one.
Let us know where on the way to sending your first network message you've stumbled upon a problem.
Hope this helps.
Building the future of holographic navigation. We're hiring.