Closed lukastoenneMS closed 9 months ago
We appreciate your feedback and thank you for reporting this issue.
Microsoft Mixed Reality Toolkit version 2 (MRTK2) is currently in limited support. This means that Microsoft is only fixing high priority security issues. Unfortunately, this issue does not meet the necessary priority and will be closed. If you strongly feel that this issue deserves more attention, please open a new issue and explain why it is important.
Microsoft recommends that all new HoloLens 2 Unity applications use MRTK3 instead of MRTK2.
Please note that MRTK3 was released in August 2023. It features an all-new architecture for developing rich mixed reality experiences and has a minimum requirement of Unity 2021.3 LTS. For more information about MRTK3, please visit https://www.mixedrealitytoolkit.org.
Thank you for your continued support of the Mixed Reality Toolkit!
Describe the problem
MRTK services can get destroyed at runtime, removing event listeners etc. Similarly services can get created at runtime after components that use them. Even if components check for a service on Start/Awake/Enable, that service may be removed and recreated later, leaving a dysfunctional component.
Example:
During tests we create a scene with a camera and a MixedRealityInputModule on it (for piping events to the Unity event system). Between tests the event system service is torn down and recreated for the next test, which leaves a broken input module that will not receive source state events any longer.
The fix for this is to destroy the input module at the end of each test and recreate it for the next. But this kind of problem is easy to produce and hard to detect.
Describe the solution you'd like
There should be a debug more and/or test where services print warnings when they are destroyed while listeners are still registered. That way we at least know when components may be broken.