Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Mapbox SDK. has anyone used or had some success?

Discussion in 'General Discussion' started by Missionmap, Apr 4, 2017.

Thread Status:
Not open for further replies.
  1. Missionmap

    Missionmap

    Joined:
    Mar 28, 2017
    Posts:
    4
    Hi
    I am just playing around with the new Mapbox SDK to test its features for a potential mapping application. Just wondered if anyone has had some success with it so far? There are no tutorials and not much posted info on it for Unity. (Including the Mapbox website). They have been releasing this stuff for IOS and Android, but it's not overly useful for Unity esp with the C# code.
    Thanks

    S
     
  2. peter-motive

    peter-motive

    Joined:
    Jul 16, 2016
    Posts:
    26
  3. Missionmap

    Missionmap

    Joined:
    Mar 28, 2017
    Posts:
    4
    Yeah thanks.
    Unfortunately that requires using Motive.io which is yet another SDK. Wanted to keep it simple and thought the Mapbox SDK would handle the online map rendering by itself. There is very little information on the SDK at the moment probably because it's new I guess.
     
  4. GameDevGuy

    GameDevGuy

    Joined:
    Nov 4, 2012
    Posts:
    96
    I looked into this previously, but held off due to a couple of the known issues (mainly memory leaks and some other optimization issues). However, the integration was fairly straight forward. Do their provided Unity examples not work for you? What problem are you having?
     
  5. Missionmap

    Missionmap

    Joined:
    Mar 28, 2017
    Posts:
    4
    The Dev examples work but are very slow and clunky. I would like to use custom developed maps built using their mapbox styles creator (map images designed online - their claim to fame), but there is nothing simple about it. Have no Idea on how to import that map style. There is next to no documentation available on this unfortunately.
     
    Last edited: Apr 26, 2017
    imaginelab likes this.
  6. BrinyBox

    BrinyBox

    Joined:
    Aug 2, 2017
    Posts:
    7
    Hey Missionmap

    I know you posted this a bit ago but I wanted to jump in and offer some assistance.

    In order to use your own custom map styles do the following:
    • Go to your Mapbox Studio account and click on the Styles section
    • Open up the additional options of the style you’d like to use and copy the Style URL shown
    • Head back to Unity and in your ImageFactory change the Map Type to Custom
    • Paste you Style URL in the Id field
    After that your map should use your custom style when you run your scene.

    Also we’ve got the second part of our tutorial live and the third should be out in the near future.
    https://www.mapbox.com/help/unity-mesh-pt-2/

    In the meantime if there is anything else in particular you’d like to know more of let us know.

    Cheers and Happy Mapping
     
  7. Osake

    Osake

    Joined:
    Jul 28, 2016
    Posts:
    2
    Tangent question:
    I'm not able to get the mesh factory to work. Your tutorial talks about adding 4 modifiers to the CityMergedBuildingsStack, then the next step says to use 3 (overwriting what you just said in the tutorial). When hitting play under either configuration, I'm not getting the San Francisco landscape I expected to see.
     
  8. Osake

    Osake

    Joined:
    Jul 28, 2016
    Posts:
    2
    Follow up: I solved the issue. There are currently two vector tile factories. One is optimized (which I must have misclicked on). For the tutorial, you need to use the regular one to get the buildings to show up.
     
  9. BrinyBox

    BrinyBox

    Joined:
    Aug 2, 2017
    Posts:
    7
    Appreciate the feedback on the tutorial. We'll work to make things clearer going forward!
     
  10. MattJack

    MattJack

    Joined:
    Oct 6, 2017
    Posts:
    2
    For me latest Mapbox for unity SDK samples don't compile with Unity 2017.1.1f1 personal

    My repro step:
    1)Download SDK for unity SDK from GitHub (https://github.com/mapbox/mapbox-unity-sdk.git)
    2)Open Globe sample : sdkproject/Assets/Mapbox/Example/Globe/Globe.unity

    Error : Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Directions.cs(11,18): error CS0234: The type or namespace name `Json' does not exist in the namespace `Mapbox'. Are you missing an assembly reference?

    Do other people have same problem / What do I do wrong?
     
  11. BrinyBox

    BrinyBox

    Joined:
    Aug 2, 2017
    Posts:
    7
    Hey Matt

    Try pulling it with git and run a batch file inside to download dependencies as well. That error is probably due to missing dependencies. "Dependencies" section here points that; https://github.com/mapbox/mapbox-unity-sdk

    Feel free to reach out to our support line as well at help@mapbox.com.
     
  12. MattJack

    MattJack

    Joined:
    Oct 6, 2017
    Posts:
    2
    Hi Briny,

    So I solved the problem this way :
    1) Created an empty unity project then imported latest MapBox for Unity package.
    2) Found "Mapbox/Core" folder and copied it
    3) Download SDK for unity SDK from GitHub (https://github.com/mapbox/mapbox-unity-sdk.git)
    4) Replaced "Mapbox/Core" folder by the one copied in 2
    5) run, it works.

    Will try your solution, not an expert xith git; Did not know there was batch file to download dependencies, looks like it is update-mapbox-unity-sdk-core.sh
    Thanks for the tip!
    And for providing support email.
     
  13. VIC20

    VIC20

    Joined:
    Jan 19, 2008
    Posts:
    2,682
    3rd party stuff like this is always tempting but remember how often such services will be discontinued for whatever reasons. It might be nice to play with but I would not use it for a long term product.
     
    RatherGood likes this.
  14. BrinyBox

    BrinyBox

    Joined:
    Aug 2, 2017
    Posts:
    7
    I understand the concern here and I know what it's like to have a project stuck/trashed due to no fault of your own. I do want to say though we are committed to being a leader in this space and yesterday we just announced a new round of funding that's going to help us get there.

    https://blog.mapbox.com/softbank-mapbox-series-c-be207b866b27

    If there is anything we can do ease your mind let us know.
     
  15. Aiursrage2k

    Aiursrage2k

    Joined:
    Nov 1, 2009
    Posts:
    4,835
    Yeah how about if the unity package provided by you actually works. I even tried using the version of unity that was in your own demo video and it didnt even work...

    Assets/Mapbox/Unity/Utilities/HTTPRequest.cs(79,25): error CS1502: The best overloaded method match for `Mapbox.Platform.Response.FromWebResponse(Mapbox.Platform.IAsyncRequest, System.Net.HttpWebResponse, System.Exception)' has some invalid arguments
    Assets/Mapbox/Unity/Utilities/HTTPRequest.cs(83,25): error CS1502: The best overloaded method match for `Mapbox.Platform.Response.FromWebResponse(Mapbox.Platform.IAsyncRequest, System.Net.HttpWebResponse, System.Exception)' has some invalid arguments

    Okay I had to update to version 2017 and the unitypackage worked. 5.6 doesnt work, I even downlo, please update your demo video or make sure to indiate what versions actually work.

    Even the tutorials are out of date with the new version
     
    Last edited: Oct 13, 2017
  16. HarisPapacharalampous

    HarisPapacharalampous

    Joined:
    Jun 19, 2017
    Posts:
    4
    did you have any luck on mapbox ?

    i am experiencing the same errors, i would appreciate any help

    thanks
    HP
     
  17. Aiursrage2k

    Aiursrage2k

    Joined:
    Nov 1, 2009
    Posts:
    4,835
    Ya you need to update to 2017
     
  18. HarisPapacharalampous

    HarisPapacharalampous

    Joined:
    Jun 19, 2017
    Posts:
    4
    thanks
     
  19. Soumikbhat

    Soumikbhat

    Joined:
    Nov 23, 2013
    Posts:
    110
    Would like to know the latest status of this asset. Is this maintained? Documented? Tutorials?
     
  20. daynamn

    daynamn

    Joined:
    Jan 11, 2014
    Posts:
    1
    I have just decided to check this out as well... unfortunately I will likely be holding off until more documentation and tutorials are provided.
     
  21. sh_code

    sh_code

    Joined:
    Apr 8, 2015
    Posts:
    17
    my experiences?
    it's an overcomplicated, opaque, buggy piece of S*** with no documentation that pretends to be a working thing to fool stupid enterprisey companies to waste hundreds of manhours of their programmers to make it at least partially usable while the stupid enterprisey companies pay money for licencing.
     
    angganaro3 likes this.
  22. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,039
    The API is a bit hard to work out, trying to be a bit too clever for its own good, but I was able to get out a pretty nice geo tour app out to a customer over a weekend of effort.

    The maps look really nice, and despite being convoluted the API is very powerful.
     
  23. starsuser

    starsuser

    Joined:
    Jul 29, 2018
    Posts:
    1
    I too tried MapBox, but just as previous posts said I think it looks like they wanted to make it just a bit too easy to use. Now it's like you try to figure out and modify an already build program, and not so much implement an additional asset.
    I tried to follow a tutorial about it but was directed at an older version, it even seems the made the newer version of the SDK even more difficult to understand and implement.
     
  24. Rubakai

    Rubakai

    Joined:
    Aug 27, 2015
    Posts:
    32
    Anyone had a look recently, or experienced other better SDKs for this type of game?
     
  25. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,039
    The changed the API, its still a bit complex but easier than before. If you spend a day or so with their samples messing around with them trying to achieve small things you will learn it pretty quickly.

    As far as I'm aware its still the best option.
     
  26. Aiursrage2k

    Aiursrage2k

    Joined:
    Nov 1, 2009
    Posts:
    4,835
    The server seems abit too slow when panning around the map (compared to say google maps), and you cant stream a location its locked into a confined area.
     
  27. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,039
    I agree the map loading can be slower than google, but you can look ahead as far as you want, so really only for the first load of a new area. And we are talking maybe 1 or 2 seconds, really not an issue in most scenarios. MapBox drives major map based applications like Lonely Planet and FourSquare.

    There is no confinement to a specific area, how did you come to this conclusion?

    MapBox has a lot more low-level access and more features for building custom map data and style, at scale is much cheaper than google. Its well worth considering for any map application.

    Google has better coverage, and more accurate point data detail. Much better direction services. If cost is not an issue (or you fall in the lower bracket of usage) its probably best choice for navigation based apps.

    EDIT: And no I'm not affiliated with MapBox, I've just built several map based apps and found it to be the best choice for my needs.

    EDIT: I haven't had any experience with the google maps for games (Real-World Gaming: https://cloud.google.com/maps-platform/gaming/). So can't comment on that.
     
    Last edited: Jan 9, 2019
  28. toto2003

    toto2003

    Joined:
    Sep 22, 2010
    Posts:
    528
    Hello Mapbox, is there any option to save and store the mesh generated data into the project so i could reuse it without having the need to press the unity play button.
    thanks
     
  29. jfa257

    jfa257

    Joined:
    Jul 17, 2013
    Posts:
    9
    Well, I just finished some serious tinkering in your source classes, because I could not get using your API methods to access the building objects , by feature ID , or Unitytile. Could you provide a tip on how to access on runtime the buildings objects?
     
Thread Status:
Not open for further replies.