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.

How to Share and Update GameObject Transforms over multiple Hololens on a Sharing Service?

edited August 2016 in Questions And Answers

Hello, I am a Unity Programmer and I am having a very difficult time with Updating transforms for game objects between multiple Hololens over the sharing service/network.

I have managed to get the generic sharing prefab and network service working on my own project and I have also applied the remote head manager successfully which creates a primitive cube and updates its transform across multiple Hololens. I even have SpatialMapping and tap to place working as well.

I now want to take my own custom game objects from within the app, place them on a wall or floor and have them update their location on other headsets.

I've Searched through the Question and Answers as well as the forums on both this and Unity's site. I have re-watched Hololens academy multiple times including 240 sharing. But the issue of updating transforms of game objects within an app hasn't been brought up but once back in July.

I am not trying to use Photon or Unet unless i absolutely have to as i would like to keep this as simple to follow as possible.

and As for trying to read how the custom message can be altered, i'm not sure I have enough networking background to figure it out on my own. would anyone be able to help me figure this out?

Best Answers


  • This is relevant to my interests. We're hoping to ultimately have a server that holds information on the spatial coordinates and state of a handful of visualizations.

  • Thanks for the Advice and Help, I wasn't able to try it over the weekend as the Hololens is at my job. I will try these tips today and see how it goes.

  • Yes, you'd need an item index for specific items.

    Yes, you could put the script on a game object and have it handle sending it's positions. Combined with the item index, that would be cleaner. It's clear to me that you are getting this. The script would probably be an edited version of tap to place since you only need to send the transform once the object has been placed.

    The anchor is required as it represents a common reference point for all devices. When the app starts up each device makes an 'implicit' anchor to represent the origin of the world. This position is arbitrary. The common reference point gives each device a transform from it's arbitrary origin to the common reference point. Put more simply, raw world coordinates are different for each device in the experience. If you just sent the vector3 and quaternion without doing the anchor inversetransform function everyone in the experience would see things in different places.

    So you can make a callback or you can just make a modified tap to place that keeps track of the object id and sends the updated transform with the object id. If you aren't going to be able to add new objects to the world then you probably don't need the separate script.

    This post provided as-is with no warranties and confers no rights. Using information provided is done at own risk.

    (Daddy, what does 'now formatting drive C:' mean?)

  • Thank you Patrick!

    After working with a programmer at work we were able to get a simple test running. The placement now changes over 2 headsets.

    However there is some offset in position between the headsets that i am troubleshooting at the moment.

    Ill let you know if i get it sorted out.

    You have been a great help and your response time is impeccable.

  • I have the similar issue. I could get some time without offset and most of the time with offset. I am not sure what s really causing this inconsistencies. If you can share some of your experience, that will be great.

  • edited September 2016

    Has anyone been using the sync system? I've been experimenting a bit with it but haven't had much luck.

    Stephen Hodgson
    Microsoft HoloLens Agency Readiness Program
    Virtual Solutions Developer at Saab
    HoloToolkit-Unity Moderator

  • 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?

  • I really like the direction of this project. I am doing something similar, but want to control the scale of an object as well as position. I'd like to have one unit control the object (position, rotation, and scale), but am running into problems. I have several units able to view the same object and all can change it's position (based off of the 240 project), but keep running into issues with scale. Any suggestions?

  • Davon92Davon92
    edited October 2016

    Hello, Back Again with an Update to this Question. I Had it working for a bit But because of changes asked for in this project We Have Hit A Nose Dive. Our Client wanted an administrator Menu To Select and Create Objects for users to see.

    We have the admin menu working. it instantiates objects and allows me to place them on walls. with the tap gesture. however when new users join the session they do not create the items that the admin placed. because they were not in their scene to begin with. also they only move the last object placed By the admin and only when the other headsets have an object placed in their scene. What do I need to provide to the discussion so that I Can I Fix This?

    To Make this Simple Here is what i have.

    I Have A Hologram Collection already in scene, That is my world Anchor. The Admin will instantiate child game objects to the hologram collection.

    (The users that join will receive these objects in the same location as they were placed by the Admin. )

    I Have Added to the Custom Message script Written to Receive Spawned Items position and rotation.

    I have another Script Name Senders Attached to my Hologram Collection that acts similar to the remote head Manager. it has a start function that assigns the A Message Handler Enum to the local position and local rotation of the Hologram Collection. It also has the instance session joined and session left delegates subscribed to so that i can check when a user enters and leaves.

    The problem that im seeing is that i have no way to tell another hololense to
    instantiate a group items from the previous hololense.

  • so I've managed to solve a bunch of problems that I have had and am only left with 1 main major problem to deal with.

    I am trying to create and share a common world anchor. However the documentation handles this very differently than how Patrick described sharing of transform position and rotation. What is the Proper Way to create and send world anchor information over hololense using the import export manager and Custom Message.cs. Thank you,

Sign In or Register to comment.