Include the following details (edit as applicable):
- Issue category: Lightship Maps
- Device type & OS version: iOS
- Host machine & OS version: Windows
- Issue Environment : Unity Remote
- Xcode version:
- ARDK version:
- Unity version: 2021.3.37f1
Description of the issue:
Just learned about lightship not long ago and trying to test it out over mapbox. When trying to test with Unity Remote, I get this error when trying to run on my iphone to test the location and just the empty scene (no map gets generated, character is in emptiness).
NullReferenceException: Object reference not set to an instance of an object
Niantic.Lightship.Maps.LightshipMapView.SetMapCenter (UnityEngine.Vector3 center) (at Library/PackageCache/com.niantic.lightship.maps@633b3bbcda9e/Runtime/Niantic.Lightship.Maps/LightshipMapView.cs:282)
The line in question is
// Update the map’s view based on where our player is
_lightshipMapView.SetMapCenter(transform.position);
I have tried tweaking it to no avail. I thought maybe it was because locationServices wasnt getting started, but it seems the file does this once it determines the application isnt running in editor. I also have location services enabled for unity remote. How do I get it to work with my phones location?
Also because im sure this will be asked as it would seem this would be the issue, but yes I have the Lightship Map View on the Player set in the editor to the scenes LightshipMap object, so its not because that isnt set.
Edit: After browsing some other posts, it seems it might be because when unchecking the default start position, the _unitConverter doesnt get initialized. The issue with this, is when the default start position is checked, it doesnt ever seem to update to my phones location, it just stays at the start position. I cant move or anything, i can move the camera but not that player