chgatla-microsoft / QRTracking

MRTK sample app for QRtracking
MIT License
74 stars 69 forks source link

Microsoft.MixedReality.QR non functional on Unity 2021 #45

Open XPav opened 2 years ago

XPav commented 2 years ago

Using the NuGet package 0.5.3013, a simple call to .QRCodeWatcher.IsSupported results in a MissingMethodException

MissingMethodException: System.RuntimeType::GetGUID(System.Type,System.Byte[])
  at System.RuntimeType.get_GUID () [0x00000] in <00000000000000000000000000000000>:0 
  at WinRT.IObjectReference.As[T] () [0x00000] in <00000000000000000000000000000000>:0 
  at WinRT.ActivationFactory`1[T].ActivateInstance[I] () [0x00000] in <00000000000000000000000000000000>:0 
  at Microsoft.MixedReality.QR.QRCodeWatcher+Statics..ctor () [0x00000] in <00000000000000000000000000000000>:0 
  at System.Reflection.RuntimeConstructorInfo.InternalInvoke (System.Object obj, System.Object[] parameters, System.Boolean wrapExceptions) [0x00000] in <00000000000000000000000000000000>:0 
  at System.RuntimeType.CreateInstanceMono (System.Boolean nonPublic, System.Boolean wrapExceptions) [0x00000] in <00000000000000000000000000000000>:0 
  at System.RuntimeType.CreateInstanceDefaultCtor (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Boolean wrapExceptions, System.Threading.StackCrawlMark& stackMark) [0x00000] in <00000000000000000000000000000000>:0 
  at System.Activator.CreateInstance[T] () [0x00000] in <00000000000000000000000000000000>:0 
  at WinRT.WeakLazy`1[T].get_Value () [0x00000] in <00000000000000000000000000000000>:0 
  at Microsoft.MixedReality.QR.QRCodeWatcher.IsSupported () [0x00000] in <00000000000000000000000000000000>:0 
  at QRCodeVisualizer.InitializeQR () [0x00000] in <00000000000000000000000000000000>:0 
  at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult].Start[TStateMachine] (TStateMachine& stateMachine) [0x00000] in <00000000000000000000000000000000>:0 
  at QRCodeVisualizer.StartScanning () [0x00000] in <00000000000000000000000000000000>:0 
keveleigh commented 2 years ago

I wonder if this is related to their Mono and .NET updates in 2021: https://forum.unity.com/threads/unity-future-net-development-status.1092205/