Author Topic: World Map 2D Lite Edition - using with unity and vuforia  (Read 56 times)

nalincy

  • Newbie
  • *
  • Posts: 4
    • View Profile
Hello!
I am trying to make an AR application using unity and vuforia. I am thinking to use World Map 2D Lite Edition to show world map on a scene with some selection of countries. As per the instructions from World Map 2D Lite Edition, I dragged the prefab “WorldMap2D” from “Resources/Prefabs” folder to my scene.
I am getting two errors,

1. NullReferenceException: Object reference not set to an instance of an object
WPMF.CityScaler.ScaleCities () (at Assets/WPMap2DLiteEdition/Scripts/Core/CityScaler.cs:38)

2. NullReferenceException: Object reference not set to an instance of an object
WPMF.WorldMap2D.Update () (at Assets/WPMap2DLiteEdition/Scripts/Core/WorldMap2DPrivate.cs:260)

These two errors are raised when code is trying to read "Camera.main". As it is an AR app, I am not using main camera. I am using ARCamera from Vuforia.

Is there a way to fix these errors and use the World Map 2D Lite Edition with AR app (using Unity and Vuforia)?

Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 4554
    • View Profile
Re: World Map 2D Lite Edition - using with unity and vuforia
« Reply #1 on: May 11, 2019, 11:40:13 AM »
The Lite version expects a camera tagged with MainCamera - it will be improved in next beta to pick up any camera in case it doesn't find the main camera.

nalincy

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: World Map 2D Lite Edition - using with unity and vuforia
« Reply #2 on: May 15, 2019, 12:32:52 AM »
Thanks for the information. When can we expect next beta release of World Map 2D Lite Edition?

Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 4554
    • View Profile
Re: World Map 2D Lite Edition - using with unity and vuforia
« Reply #3 on: May 15, 2019, 02:19:44 AM »
Check out lates beta - the new update now dynamically looks for a valid camera if none has the CameraMain tag.