VRTK icon indicating copy to clipboard operation
VRTK copied to clipboard

WMR VRTK_UIPointer Null Reference Exception after UWP Deployment

Open arufolo opened this issue 8 years ago • 2 comments

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

  1. Configure a scene with VRTK_UIPointer on controllers.
  2. Create a UWP build with the Windows Mixed Reality SDK using .NET Scripting Backend
  3. 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)

arufolo avatar Nov 08 '18 20:11 arufolo

Not sure if this is your problem, but maybe its related: https://github.com/thestonefox/VRTK/issues/1885

beccannlittle avatar Nov 08 '18 21:11 beccannlittle

@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.

arufolo avatar Nov 09 '18 14:11 arufolo