Skip to content
This repository was archived by the owner on Nov 16, 2024. It is now read-only.
This repository was archived by the owner on Nov 16, 2024. It is now read-only.

OpenXR Persistence on hololens does not work. #322

@Peamon

Description

@Peamon

With at least unity 2021.3.6, OpenXR with mixedreality openxr 1.10 and worldlockingtools 1.5.9 and master, compiled in UWP64 for hololens 2.

The persistance of the anchor does not work, and WorldLockingManager.GetInstance().AnchorManager.SupportsPersistence is false

To make it works, simply change the line 225 of file WorldLocking.Core/Scripts/XR/AnchorManagerXR.cs

from :

openXRPersistence = XRGeneralSettings.Instance.Manager.activeLoader.name.StartsWith("Open XR");

to:

openXRPersistence = XRGeneralSettings.Instance.Manager.activeLoader.name.StartsWith("OpenXR");

(juste remove a space !!!)

The effective name of activeLoader is OpenXRLoader as shown in logs :

ActiveLoader name:[OpenXRLoader] type:[UnityEngine.XR.OpenXR.OpenXRLoader]
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:Log(Object)
Microsoft.MixedReality.WorldLocking.Core.AnchorManagerXR:.ctor(IPlugin, IHeadPoseTracker, XRAnchorSubsystem, XRSessionSubsystem)
Microsoft.MixedReality.WorldLocking.Core.<TryCreate>d__7:MoveNext()
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start(TStateMachine&)
Microsoft.MixedReality.WorldLocking.Core.<SelectAnchorManager>d__114:MoveNext()
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start(TStateMachine&)
Microsoft.MixedReality.WorldLocking.Core.<ResetAnchorManager>d__113:MoveNext()
System.Runtime.CompilerServices.AsyncVoidMethodBuilder:Start(TStateMachine&)
Microsoft.MixedReality.WorldLocking.Core.WorldLockingManager:SetContext(WorldLockingContext)
Microsoft.MixedReality.WorldLocking.Core.WorldLockingContext:CheckPushSettings(Scene)
Microsoft.MixedReality.WorldLocking.Core.WorldLockingContext:OnEnable()

It will be great if this can be corrected in the master !!!

the issue is also described here: https://forum.unity.com/threads/hololens-2-persist-anchors-with-world-locking-tools.1406428/

Metadata

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