By Aarav Kumar, 2025
This tutorial will walk you through setting up real-world maps inside your Unity projects using Mapbox. We’ll cover account setup, SDK import, map visualization, and basic customization.
Why use Mapbox? (as of 2025)
Google Maps no longer supports Unity directly.
Apple Maps requires restrictive licensing.
Mapbox is free for most uses (with a generous free tier) and integrates easily into Unity.
Visit Mapbox and create a free account.
After registering, you'll be able to access your Access Token (needed to use Mapbox services) -- you can use your Default public token, or create a new token for your project.
Once logged in, navigate to the Mapbox Unity SDK page and download the SDK package.
Create a new Unity project or open an extended one. For best comptability, choose the default (built-in) render pipeline, not the Universal Render Pipeline (URP) or High-Definition Render Pipeline (HDRP), as many of the materials of Mapbox components are not comatible with newer render pipelines, and will simply not show up in your project.
Go to Assets > Import Package > Custom Package. Select the downloaded Mapbox SDK package.
IMPORTANT: During the import dialog:
Only select Mapbox and ThirdPartyAssets.
Deselect everything related to AR (e.g., ARKit, ARCore), because these modules are outdated and incompatible with newer Unity versions.
By deselecting AR components during import, you can avoid most console errors.
If errors still appear:
Click the error in the Unity Console. It will take you directly to the corresponding file and line of code causing the problem.
Look carefully at the error message and the problematic line (for example, missing types or methods related to AR).
Comment out the relevant block of code by adding // at the start of the line(s).
Save the file and return to Unity. Unity will recompile the scripts automatically.
Enter Your Access Token
After importing, Unity will prompt you to enter your Access Token. Copy it from your Mapbox account dashboard, and paste it into the prompt in Unity and submit.
Load a Template Scene
Mapbox provides several Example Scenes to get started quickly.
Navigate to Assets/Mapbox/Examples, and open a scene such as Abstract Map, Location-Based Game, or AR Tabletop Map (choose based on your project needs).
Play the Scene
Hit the Play button in Unity. You should see real-world maps loaded with satellite imagery, terrain, or styled data overlays depending on the template.
Changing Location
Find the GameObject called AbstractMap or similar.
In the Inspector:
Under Latitude/Longitude, enter the coordinates for your desired location.
Example: New York, Long Island coordinates could be entered.
Adjusting Map Properties
In the Map settings you can:
Change zoom level (how close/far the map starts).
Toggle visibility of buildings, roads, and points of interest (POI).
Change the map style (dark, light, satellite, street, etc).
Alter terrain exaggeration.
Load larger map areas (be careful—this can slow your system).
Switching Templates
If you want to try a different example:
Go to Assets/Mapbox/Examples.
Open any other example scene (e.g., Astronaut Game, Driving Simulator).
Each template provides a different setup: some are optimized for driving games, others for top-down strategy, etc.
Token Security: Never share your Mapbox Access Token publicly.
Performance: Loading too large a map area at once can crash Unity or cause massive lag. Start with small areas.
Customization: Explore the Mapbox Styles editor online to create your own custom map themes.
Expanding Functionality: Mapbox SDK supports adding 3D models, elevation data, and dynamic updates based on real-world data feeds.
Mapbox SDK Unity Documentation: https://docs.mapbox.com/unity/maps/guides/
Unity Mapbox SDK Youtube Tutorial: https://www.youtube.com/watch?v=UOJYY7DXRmU
Unity SDK Getting Started: https://docs.mapbox.com/mapbox-unity-sdk/docs/00-getting-started.html
Mapbox SDK Set Up Walkthrough: https://medium.com/data-mining-the-city/unity-mapbox-sdk-c9aceaca5efb
Creating a Map in Unity — Mapbox Guided Tutorial: https://docs.mapbox.com/help/tutorials/create-a-map-in-unity/