Hololens Academy 211 obsolete

Hi everyone,

I tried to work my way through the Hololens Academy Tutorial, though it has been made in late 2016 some code already is obsolete and I can’t seem to find any solutions. In part 211 it uses the scripts HandManager.cs and HandGuidance.cs and both give compile errors.

UnityEngine.XR.WSA.Input.InteractionManager.SourceDetected += InteractionManager_SourceDetected;
UnityEngine.XR.WSA.Input.InteractionManager.SourceLost += InteractionManager_SourceLost;

The SourceDetected, SourceLost and SourceReleased ard obsolete and need to be replaced by InteractionSourceDetected etc. But this won’t solve the problem and now I’m getting a overload error.

Can someone help me with this problem?

Hey!

Yes as you noticed, they are deprecated and you’ll get warnings and error messages from it.
On the Hololens toolkit Github page (GitHub - 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) they are stating that an update will be coming at the end of this month, which should resolve these issues.

In the meantime, I rewrote some code for you that should help with this. Bear in mind that this is untested.
See attached HandGuidance.cs

3234138–248371–HandGuidance.cs (8.24 KB)

Thank you!
Do you have a solution for HandsManager too?