Skip to content
This repository has been archived by the owner on Apr 23, 2024. It is now read-only.
This repository has been archived by the owner on Apr 23, 2024. It is now read-only.

Clients does not obtain Anchor from server with multiple hololenses.. #20

Open
@SorenMuller

Description

Hi,

I'm trying to get your demo to work with multiple holo lenses.

The hololens acting as server works fine.
But when I try to join that, I get an nullreference exeption at the HERE location,
since AnchorStore is null..
This results in no shared anchor...

Hope someone can help..

UNetAnchorManager.cs :

private bool AttachToCachedAnchor(string CachedAnchorName)
{
           if (string.IsNullOrEmpty(CachedAnchorName))
            {
                Debug.Log("Ignoring empty name");
                return false;
            }
#if UNITY_WSA
            UnityEngine.XR.WSA.Persistence.WorldAnchorStore anchorStore = WorldAnchorManager.Instance.AnchorStore;

            string[] ids = anchorStore.GetAllIds();   <== HERE



            for (int index = 0; index < ids.Length; index++)
            {
                if (ids[index] == CachedAnchorName)
                {
                    Debug.Log("Using what we have");
                    anchorStore.Load(ids[index], objectToAnchor);

Regards
Søren Müller
CadPeople A/S

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions