The Mapbox Unity SDK is a set of tools to build Unity applications from real map data. It consists of a robust API for interfacing with Mapbox web services and converting map resources into game objects as well as a robust graphical user interface built on top of the Unity platform. This guide provides an overview of how the Mapbox Unity Mapbox Unity SDK works, how to use it, and how to get started building applications.
How the Mapbox Unity SDK works
The Mapbox Unity SDK is designed to help Unity developers add dynamic map data to their games and applications by providing a straightforward programmatic and graphical interface to Mapbox’s web services APIs, including the Mapbox Maps API, Geocoding API, and Directions API.
While some map-centric Unity plugins are designed to help developers build static game environments from map data, the Mapbox Unity SDK is designed to request and render map data at runtime. This means that applications built with the Mapbox Unity SDK will always display the most recent version of spatial data. It also means that games and applications only ever request the subset of data that corresponds with the area the user is viewing, keeping games and applications lightweight.
Using the Mapbox Unity SDK
The Mapbox Unity SDK is used with the Unity desktop application.
Installing the Mapbox Unity SDK
Creating game objects
The Mapbox Unity SDK can be used to build rich environments from a variety of different types of data, including terrain data, raster map tiles, and vector map tiles, among others.
The Mapbox terrain-rgb tileset is designed for high resolution elevation visualizations and it is especially well-suited to creating 3D meshes with Unity. See the Mesh generation basics example for more information.
Features from vector tiles
Whether you’re using a Mapbox tileset or a custom tileset you created via the Mapbox Uploads API, the Mapbox Unity SDK can request vector tiles, convert them into game objects or meshes, and render them alongside the rest of your game data. See the Slippy map example for more information.
Accessing Mapbox web services
The Mapbox Unity SDK can connect your game or application to Many of Mapbox’s web services APIs, including the Mapbox Maps API, Geocoding API, and Directions API. See the various Playground examples for more information on interacting with Mapbox APIs.
The Mapbox Unity SDK works anywhere Unity works, including, desktop, and mobile and coming soon to the web.