Mapbox Announces Unity SDK

Mapbox Announces Unity SDK

Nov 10, 2016 – Today Mapbox has announced the new Unity SDK giving developers direct access to Mapbox from within Unity, bringing the full spectrum of Mapbox API’s to location-based games, VR, and AR. All of this is available across platforms: mobile, game consoles, and web browsers.

The SDK exposes reliable library functions to develop Unity applications tapping into Mapbox maps, geocoding, and directions API’s. This makes global map layers for streets, terrain, satellite, points of interest, addresses, places, routing, traffic, and more instantly available in Unity. For example, stream Mapbox Streets map tiles to generate a city-based environment. Keep it flat, or go into the 3rd dimension with building heights:

mapbox-unity-sdk-mapbox-Unity SDK

Access the geocoding API to build geographic leaderboards or use the directions API to lead players through narrow streets to the closest action. Or, like in this example of the Grand Canyon, combine the Mapbox elevation layer and satellite imagery into a comprehensive 3d model.

Mapbox has designed the SDK with flexibility in mind, maximizing convenience while avoiding assumptions about your game. For instance, with only a couple of lines of code, you can convert your character’s location into a human-readable name like “Grand Canyon”:

private Geocoder geocoder = new Geocoder(new Mapbox.Unity.FileSource());
private ReverseGeocodeResource reverseGeocode
  = new ReverseGeocodeResource(new GeoCoordinate(38.897, -77.036));
geocoder.geocode(reverseGeocode  (ReverseGeocodeResponse res) =>
{
  // Use geocoding data at run time, in your game
});

Games and global mapping data are a powerful combination.

Source: Camilla MahonMapbox Blog

Categories: Software

About Author

GIS Resources

GIS Resources is an initiative of Spatial Media and Services Enterprises with the purpose that everyone can enrich their knowledge and develop competitiveness. GIS Resources is a global platform, for latest and high-quality information source for the geospatial industry, brings you the latest insights into the developments in geospatial science and technology.

Write a Comment

Your e-mail address will not be published.
Required fields are marked*

This site uses Akismet to reduce spam. Learn how your comment data is processed.