2.5.2 Hit Testing throws Null Reference by default (M1 Machine)

Include the following details (edit as applicable):

  • Device type & OS version: iOS
  • Host machine & OS version: Mac M1 Ventura
  • Issue Environment : Unity Mock / On Device
  • Xcode version: (latest)
  • ARDK version: 2.5.2
  • Unity version: 2021.3.20f , Standard Render Pipeline

Description of the issue:
Creating a bare bone scene with ARDK 2.5.2 and using the AR Scene Manager Prefab and the Hit Tester / Plane Manager / Cursor Renderer Components throws following exception:

NullReferenceException: Object reference not set to an instance of an object
Niantic.ARDK.Utilities.Input.Legacy.PlatformAgnosticInput.IsTouchOverUIObject (UnityEngine.Touch touch) (at Assets/ARDK/Utilities/Input/Legacy/PlatformAgnosticInput.cs:110)
Niantic.ARDKExamples.Helpers.ARHitTester.TouchBegan (UnityEngine.Touch touch) (at Assets/ARDKExamples/Common/Helpers/AR/ARHitTester.cs:102)
Niantic.ARDKExamples.Helpers.ARHitTester.Update () (at Assets/ARDKExamples/Common/Helpers/AR/ARHitTester.cs:90)

Doing exactly the same on 2.3.2. works fine. Anyone having a fix for this?


Hey Tobias,
you’re most likely missing an EventSystem object in your scene.
Just create an empty object and attach a Standalone Input Module component to it.

That should fix your NullReferenceException.
Cheers
Leo

Will try, thanks a lot mate :slight_smile:

Hello Tobias, did creating an EventSystem resolve this issue?

For reference: Had the same issue. Adding a StandaloneInputModule solved it for me