unity-game-enginehololensunity3d-unet

Hololens having trouble anchoring as host or client - Unet


I am working with the HoloLens sharing with the unet example from the holotoolkit. I don't really have a problem but more like an annoyance. Almost every time I go to launch the app to test the HoloLens has trouble anchoring either as the host or as the client. This leads to me having to constantly restart the devices which seem to work out, it is really a pain, closing the application and just restarting it doesn't ever seem to work. Is there something that can be done about this?


Solution

  • I know this is old but, but I fixed this problem by creating a method that the host could call that deletes the current anchor and creates another one in its place and allow the clients to connect once again.

        public void ResetAnchor()
        {
    
            WorldAnchor currentAnchor = objectToAnchor.GetComponent<WorldAnchor>();
    
            if (currentAnchor != null)
            {
                DestroyImmediate(currentAnchor);
            }
    
            AnchorName = "";
    
            CreateAnchor();
        }