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

InputManager OnFocusEnter, OnFocusExit Events Reversed #366

Closed tshadle closed 7 years ago

tshadle commented 7 years ago

In InputManager.cs, lines 355 and 364 reverse references to OnFocusExitEventHandler and OnFocusEnterEventHadler. As a result OnFocusEnter and OnFocusExit fire in the wrong order.

Also, OnFocusEnterEventHadler contains a typo.

To test, run ColorPickerExample. It's currently broken. Reverse the refs in InputManager.cs to fix.

Thanks.

jessemcculloch commented 7 years ago

Yeah, I am seeing the same thing. Put in some debug log statements on onFocusEnter and Exit, and they are firing opposite

aalmada commented 7 years ago

I checked the code and they really are reversed: https://github.com/Microsoft/HoloToolkit-Unity/blob/63dabf4826332a82ff369569a7f1d7435b9ebb48/Assets/HoloToolkit/Input/Scripts/InputManager.cs#L353-L369

StephenHodgson commented 7 years ago

Sorry guys, I think that may have been my fault. I'll fix that right meow.