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.
Sharing Holograms - Help!
I'm trying to get hologram sharing working in my own app, but l'm honestly shocked how poor the documentation is. Here's the steps from the academy:
- In the Project panel navigate to the HoloToolkit\Prefabs\Sharing folder.
- Drag and drop the Sharing prefab into the Hierarchy panel.
Are you kidding me? You preconfigured the entire thing, and you just drag everything in? There's a gazillion scripts and objects in there, with no explanation about which scripts does what.
The holotoolkit wiki isn't much more useful:
https://github.com/Microsoft/HoloToolkit-Unity/wiki/Sharing
SO! Can someone please put a step-by-step how to send and received holograms and messages using this service? (already got world anchors placement, serialization and deserialization down - I just need to broadcast and received them as well as other types of messages for current application state)
Best Answer
-
Optionsneerajwadhwa mod
@dotMorten trying to find the relevant portions from your post where we can help.
Can someone please put a step-by-step how to send and received holograms and messages using this service?
Option #1: If using Shared Holograms academy class:
CustomMessages.cs is the class you can edit. For example:
public enum TestMessageID defines the information you want to share in your application.Look at: public void SendHeadTransform(Vector3 position, Quaternion rotation, byte HasAnchor)
This will teach you how to broadcast those custom messages.You cannot send a message to an individual user using this prefab.
Option #2: HoloToolkit-Unity has a Sharing test scene under Sharing folder.
You can also check the README.md Tests section under Sharing which gives more details on usage.
This also uses a simple CustomMessages class. It draws block heads on remote users. You can look at the RemoteHeadManager.cs to see how we broadcast messages.
Overall:
Once you have the networking pieces initialized as shown by ImportExportAnchorManager and CustomMessages then you simply need something like this to broadcast them:this.serverConnection.Broadcast(
msg,
MessagePriority.Immediate,
MessageReliability.UnreliableSequenced,
MessageChannel.Avatar);6
Answers
@dotMorten trying to find the relevant portions from your post where we can help.
Option #1: If using Shared Holograms academy class:
CustomMessages.cs is the class you can edit. For example:
public enum TestMessageID defines the information you want to share in your application.
Look at: public void SendHeadTransform(Vector3 position, Quaternion rotation, byte HasAnchor)
This will teach you how to broadcast those custom messages.
You cannot send a message to an individual user using this prefab.
Option #2: HoloToolkit-Unity has a Sharing test scene under Sharing folder.
You can also check the README.md Tests section under Sharing which gives more details on usage.
This also uses a simple CustomMessages class. It draws block heads on remote users. You can look at the RemoteHeadManager.cs to see how we broadcast messages.
Overall:
Once you have the networking pieces initialized as shown by ImportExportAnchorManager and CustomMessages then you simply need something like this to broadcast them:
this.serverConnection.Broadcast(
msg,
MessagePriority.Immediate,
MessageReliability.UnreliableSequenced,
MessageChannel.Avatar);
Thanks! That's a good start (and stuff that would be good to put in the holotoolkit wiki)
My case is that I already have the message broadcast and I also register to listen to the message. But I don't receive the message although through debug I did see it sent out. Any idea?
Might be my question is not clear, I make it more details here https://forums.hololens.com/discussion/2607/hololens-sharing-using-custom-message/p1?new=1
I have the same issue. Hololens never recives anything regardless of implementation. I tired UNet, custom UDP and this. Nothing. Did you get it to work?
I just want to send a simple string to the Hololens. All this is way to overhead AND requires a PC hosting the service.