Include the following details (edit as applicable):
- Issue category: VPS
- Device type & OS version: Android 12
- Host machine & OS version: Windows
- Issue Environment: Unity Remote / On Device
- Xcode version: -
- ARDK version: 2.3.1
- Unity version: 2021.3.2f1
Description of the issue:
I have been building a Wayspot Anchor Manager based on the WayspotAnchorExampleManager found in the Wayspot Template. I have copied and modified the script appropriately up to being able to Localize the Wayspot and display it on a UI text element on the Unity Editor. The problem starts when I deploy it to my phone, my text element jumps directly from “Initializing Session”, to “Failed”. If I change the Run Environment to Live Device, my Status gets stuck at “Session Initialized” and get the following error:
System.InvalidOperationException: Operation is not valid due to the current state of the object.
at Niantic.ARDK.LocationService.LocationServiceFactory.Create (Niantic.ARDK.RuntimeEnvironment env) [0x00029]
I tried with Remote Mode and there the problem seems to be that the LocationServiceFactory.Create(_arSession.RuntimeEnvironment) method doesn’t return a location service. I thought that this was my problem until I tried the Remote Mode on the VPS Template and got the exact same error. The template does work on my phone.
My project also has AR Plane Management and the Android Permissions are set to Camera and Fine Location.
Am I missing some prefab or component that will allow me to localize Wayspots on my device?
Thank you in advance!