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




Leave a Reply

21
%d bloggers like this: