New Unity Maps SDK release

Cache tiles, load maps faster, and explore new ways to visualize maps

Mapbox
maps for developers

--

By: David Rhodes

We’re super excited about the latest version of our Mapbox Unity SDK. You can view all of the updates and new features in the change log here. One of the biggest features is the ability to cache maps to disk, which means faster map loads and a better user experience in general. We’ve also made improvements to how geometry is created, as well as added support for style-optimized vector titles.

Ambient file caching

We’ve added the ability to cache successful tile requests to disk (via SQL database). If a tile is found in the database, it will not make a web request. This has a big impact on performance because you only need to download tiles to a device once. This saves on battery power, internet usage, and processing.

Vector tile maps load significantly faster

We replaced Triangle.NET with Earcut which results in much faster geometry construction. Earcut was originally created for Mapbox GL, and is arguably the fastest and lightest polygon triangulation library out there. It’s purpose is to provide very fast real-time triangulation, sacrificing some triangulation quality for raw speed and simplicity, while being robust enough to handle most practical datasets without crashing or producing garbage.

We’ve also fixed several bugs and stripped out some unnecessary string operations that were causing slow downs. In other words, maps load faster!

Pick your vector data

Want to access specific data from a Mapbox vector tile, like the building layer, without the overhead of everything else?

We now support style-optimized vector tiles in Unity. If your style’s MapId is provided in the StyleOptimizedVectorTileFactory, we analyze sources, filters, minzoom, and maxzoom properties of that style and remove data from the vector tile that won’t be visible on the map.

The ability to essentially choose which data from a vector tile set you want saves on internet bandwidth and decoding time. It also saves on disk space once cached.

New examples

We ship the Maps Unity SDK with example scenes so you can get a feel for some cool applications of Mapbox data. Check ’em out below:

We’ve added Globe example for one method of spherically projecting tiles.

MeshGenerationBasics has new interactive elements to demonstrate some of the features we’ve added. It’s a great example of how you can enhance your applications and maps with Unity components by leveraging the Map Factory Framework and custom modifiers.

Check out TerracedWorld to see an example of how to use contour data to generate Godus-like worlds.

Install the latest version of our Unity Maps SDK here. You can get started with this tutorial series to create a visualization of 3D buildings on top of a 3D terrain map for use in any Unity application.

--

--

mapping tools for developers + precise location data to change the way we explore the world