Mixedrealitytoolkit-unity: NullReferenceException in ControllerFinder.OnEnable when using the HoloLensCamera

Created on 7 May 2018  路  7Comments  路  Source: microsoft/MixedRealityToolkit-Unity

This occurs due to there not being a motion controller attached to the camera.

The fix is to check whether or not the motion controller singleton has initialized rather than assuming it is safe to use the instance.

Mixed Reality Toolkit Release Version

2017.2.1.4

HoloLens

Most helpful comment

Using the MixedRealityCamera prefab will also cause this issue (though it might be good to deprecate that as well and narrow down to one configurable camera prefab instead).

All 7 comments

The HoloLens camera prefab is depreciated.

Probably best to remove.

@StephenHodgson,

While I agree that the HoloLens camera should probably be removed, we should still harden the controller finder, in case someone removes the controller from the MixedRealityCamera prefab (ex: HoloLens only projects)

People shouldn't be removing things from prefabs anyway.

Using the MixedRealityCamera prefab will also cause this issue (though it might be good to deprecate that as well and narrow down to one configurable camera prefab instead).

@StephenHodgson, it could be argued that if people are removing things (that they don't need or that their target platform does not support) from prefabs the prefabs have too much on them by default.

Yup, that's why we're taking the configuration profile approach in vNEXT.

This was released in the 2017.4.0.0 release candidate

Was this page helpful?
0 / 5 - 0 ratings