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.

Do you need both Unity Spatial Mapping Renderer and SpatialMapping Prefab

I'm a little unclear as to how these two related. Are they mutually exclusive or do you need both? If both, what does the Renderer do that the Prefab doesn't?

Best Answer

Answers

  • stepan_stulovstepan_stulov ✭✭✭
    edited September 2016

    You usually need one game object in your scene that has one SpatialMappingCollider component and one SpatialMappingRender component attached to it.

    SpatialMappingCollider is being fed a mesh from the depths of the HoloLens and acts as a usual Unity's collider. You can have your cubes fall onto it. You can change some properties of this component like freeze mesh update or disable the component altogether.

    SpatialMappingRenderer renders a mesh that is being fed to it in the same way as with the SpatiamMappingCollider. You can change some properties of this component like freeze mesh update or select different rendering modes like whether or not the spatial mesh should occlude your other stuff etc.

    Now whether or not that game object is an instance of a prefab or done anew is up to you.

    There may also be a SpatialMapping component that, if I may speculate, confused you. That script comes from the HoloToolkit and is merely a wrapper around the SpatialMappingCollider and SpatialMappingRenderer, it introduces nothing conceptually new, just a convenience.

    I think there is generally a confusion about what parts are pure Unity's APIs for HoloLens and what are C# convenience tools from the Holo Toolkit written by Microsoft folk. I recommend drawing that line in your head as early as possible :)

    Building the future of holographic navigation. We're hiring.

Sign In or Register to comment.