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.
Spectator View Setup - No NetworkDiscoveryWithAnchor objects
I am setting up Spectator View for a project that's under an NDA. This is my first time doing this, and I'm already running into some trouble regarding anchors.
On following the steps as outlined here:
one of the errors I get is as follows:
NullReferenceException: Object reference not set to an instance of an object SpectatorView.JoinSelectedSessionButton.Update () (at Assets/Addons/HolographicCameraRig/SV_UNET/Prefabs/Support/Scripts/UI/JoinSelectedSessionButton.cs:32)
Line 32 of JoinSelectedSessionButton.cs is
if (networkDiscovery.running && networkDiscovery.isClient)
The error exists because the static variable Instance of type NetworkDiscoveryWithAnchors is assigned null, as the starting code for that class did not find any objects that are of type NetworkDiscoveryWithAnchors. This debug output explains:
Expected exactly 1 SpectatorView.NetworkDiscoveryWithAnchors but found 0 UnityEngine.Debug:LogFormat(String, Object) SpectatorView.NetworkDiscoveryWithAnchors:get_Instance() (at Assets/Addons/HolographicCameraRig/SV_UNET/Scripts/NetworkDiscoveryWithAnchors.cs:33) SpectatorView.SpectatorViewManager:Update() (at Assets/Addons/HolographicCameraRig/Scripts/SpectatorViewManager.cs:298)
Right now in my scene I don't have any anchors. But before I add one into place, I want to make sure that upon adding one, this line
NetworkDiscoveryWithAnchors objects = FindObjectsOfType<NetworkDiscoveryWithAnchors>();
will return an array of length one.
I did try having the hologram I want to anchor to as a child of a game object with the NetworkDiscoveryWithAnchors script. That didn't work. I also tried making the hologram as a child of the UNetAnchorRoot game object that's part of the Sharing prefab.
What am I supposed to do? I feel like I don't need to do anything except just add an anchor to the scene (which I don't know how quite yet).