Hi, I download the latest HoloLens sample (v10.4.4) from the AssetsStore and configured the project step by step. Everything is working fine except this weird error that appears in the console at start. It's related to OpenXR Loaders.
NullReferenceException - Vuforia/Scripts/Internal/RuntimeOpenSourceInitializer.cs:119
I noticed that xrManager.activeLoader stay NULL forever in UnityEditor, is this behaviour desired?
Should I ignore that NullReferenceError at startup in Editor? Will it be fixed in the future?
class UnityXRBridge : IUnityXRBridge
{
public UnityXRBridge()
{
RegisterCallbacks();
}
void RegisterCallbacks()
{
var xrSettings = XRGeneralSettings.Instance;
var xrManager = xrSettings.Manager;
var xrLoader = xrManager.activeLoader;
var xrInput = xrLoader.GetLoadedSubsystem<XRInputSubsystem>();
xrInput.trackingOriginUpdated += TrackingOriginUpdated;
}
Temporarily put a stub. Looks very ugly. Sorry).
xrManager.activeLoader returns null.
But if you get the list via xrManager.activeLoaders. You can then select the correct OpenXRLoader.
----------------------