microsoft / MixedRealityToolkit-Unity

This repository is for the legacy Mixed Reality Toolkit (MRTK) v2. For the latest version of the MRTK please visit https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity
https://aka.ms/mrtkdocs
MIT License
6k stars 2.12k forks source link

IsEnabled value is null in WindowsMixedRealityDeviceManager #9636

Closed amitsheokand closed 3 years ago

amitsheokand commented 3 years ago

Describe the bug

I created a brand new Unity project following the documentation here using Unity versions 2019.4.23 with MR Feature Tool v1.0.2103.3 Beta. After setting MRTK configuration profile to "DefaultXRSDKConfigurationProfile" in Playmode it throws following error

"Microsoft.MixedReality.Toolkit.XRSDK.WindowsMixedReality.WindowsMixedRealityDeviceManager has not set a value for IsEnabled, returning false."

To reproduce

Steps to reproduce the behavior:

  1. Create a new project using following guide
  2. import MRTK
  3. setting MRTK configuration profile to "DefaultXRSDKConfigurationProfile"
  4. Hit play
  5. See error

Expected behavior

There should be no null error.

Screenshots

image

Your setup (please complete the following information)

Target platform (please complete the following information)

keveleigh commented 3 years ago

This should be fixed in the 2.7.0-preview.2 release via https://github.com/microsoft/MixedRealityToolkit-Unity/pull/9521. It seems like the underlying cause is a weird state where Unity's settings object isn't accessible. It might be good to re-open the XR Plugin Management view in Project Settings and enable/disable the provider to try to get things properly serialized as a workaround if you can't update.

keveleigh commented 3 years ago

Closing as fixed, but happy to continue to conversation here!

Jasperouz commented 3 years ago

I have MRTK 2.7.0 but still get the same error.

keveleigh commented 3 years ago

@Jasperouz Any chance there's an exception before the IsEnabled errors in your console?

Jasperouz commented 3 years ago

Yes, I receive a _FileNotFoundException: Failed to load "vcruntime140app.dll". Please ensure that "Microsoft Visual C++ 2015-2019 Redistributable" is installed exception maybe thats the reason why.

keveleigh commented 3 years ago

Yep, that'll be it! Do you happen to have the Mixed Reality Input package installed?

SergoMar commented 3 years ago

@keveleigh Hi, I have exactly this issue, using MR Input from Feature tool for HP Reverb 2 Motion Controllers. As the A, B, X, Y buttons don't work, I thought this library (https://docs.microsoft.com/en-us/windows/mixed-reality/develop/unity/unity-reverb-g2-controllers) would help and not break the existing functionality. I have downloaded that vcruntime140_app.dll but still IsEnabled error is there both for WMR and Oculus sdk. Is there a workaround for that? Thanks.