WMR VRTK_UIPointer Null Reference Exception after UWP Deployment
Environment
- Source of VRTK: Github
- Version of VRTK: Master - Commit 80db756
- Version of Unity3D: 2018.2.14
- Hardware used: Lenovo Explorer
- SDK: Windows Mixed Reality
Steps to reproduce
- Configure a scene with VRTK_UIPointer on controllers.
- Create a UWP build with the Windows Mixed Reality SDK using .NET Scripting Backend
- Build and Deploy your WMR app. UI Pointer will NOT function correctly
Expected behavior
UI Pointer should function normally
Current behavior
UI Pointer does not work at all.
Null reference exception: VRTK.VRTK_UIPointer.SetEventSystem(EventSystem eventSystem)\r\n at VRTK.VRTK_UIPointer.ConfigureEventSystem()\r\n at VRTK.VRTK_UIPointer.OnEnable()\r\n
Followed by continuous null reference exception: VRTK.VRTK_UIPointer.LateUpdate()\r\n
Can be fixed by changing line 331 of VRTK_UIPointer to: eventSystem.gameObject.AddComponent<VRTK_EventSystem>(); (Remove the reassignment of eventSystem)
Not sure if this is your problem, but maybe its related: https://github.com/thestonefox/VRTK/issues/1885
@beccannlittle Actually that's my exact problem. Great job finding a solution that isn't modifying the VRTK source! I noticed you mention that the issue is with IL2CPP scripting backend, but just to let you know I also had it using the .NET Scripting backend.
I'll close this issue as it's clearly already been found.