We have decided to phase out the Mixed Reality Forums over the next few months in favor of other ways to connect with us.
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.
The plan between now and the beginning of May is to clean up old, unanswered questions that are no longer relevant. The forums will remain open and usable.
On May 1st we will be locking the forums to new posts and replies. They will remain available for another three months for the purposes of searching them, and then they will be closed altogether on August 1st.
So, where does that leave our awesome community to ask questions? Well, there are a few places we want to engage with you. 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. 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).