Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

MapBox is not initialized

Discussion in 'Scripting' started by Ark_Tarusov, Nov 8, 2017.

  1. Ark_Tarusov

    Ark_Tarusov

    Joined:
    Jun 24, 2016
    Posts:
    20
    Hello!
    If someone uses MapBox, maybe you can help me.
    1. MapBox does not work on phones that do not have a compass.
    2. If you reload the scene on which the map is located (for example, load another scene, and then return to the MapBox scene), the MapBox does not turn on again. Errors are not displayed.

    In what there can be a reason and knows, how it to correct?
     
  2. BrinyBox

    BrinyBox

    Joined:
    Aug 2, 2017
    Posts:
    7
    Ahoy!

    Sorry to hear about the issues you're having here.
    Can you provide more information? Did you build out to a device and your project suddenly stopped working? What specific device? Multiple devices?
    You mentioned there were no errors being displayed but if you have any type of log that you could show it would be helpful. Did you see any tiles try to populate or did nothing at all happen?

    Also please feel free to message us help@mapbox.com so we can better assist.

    Cheers,
    Jake
     
  3. Ark_Tarusov

    Ark_Tarusov

    Joined:
    Jun 24, 2016
    Posts:
    20
    Hi, BrinyBox!
    Lenovo Vibe C and Lenovo A2010.
    There is only one entry in the journal
    LocationProviderFactory: Injected DEVICE Location Provider

    UnityEngine.Debug:Log(Object)
    Mapbox.Unity.Location.LocationProviderFactory:InjectDeviceLocationProvider()
    Mapbox.Unity.Location.LocationProviderFactory:Awake() (at Assets/Plugins/Mapbox/Unity/Location/LocationProviderFactory.cs:98)

    Scenes are built following the example of "LocationProvider".
    Nothing works. initialization does not occur.
    The problem was in DontDestroyOnLoad.
    I disabled it, and when the scene reboots, everything works. This is not the most elegant solution, but I do not know about another way to solve the problem.
     
  4. Ark_Tarusov

    Ark_Tarusov

    Joined:
    Jun 24, 2016
    Posts:
    20
    I will duplicate this topic to you by mail and if the problem is resolved by mail, I will duplicate the decision in this section for the public.

    Thank you.