Setting up Mapbox

We will now see how to set up Mapbox:

  1. The very first thing we need to do is sign up for Mapbox. This requires a username, email address, and password:
  1. After you have signed up and verified your email address, it will take you to a page to find out which version of Mapbox you need. You have the option of iOS, Android, Web, and Unity:
  1. The version we want will obviously be the Maps SDK for Unity, so be sure to download the Unity package before proceeding:
  1. As per the following screenshot, you will be given an access token, which will be required to utilize the Mapbox software. Be sure to copy this key and paste it into Notepad for later use:
  1. Create a new Unity project and call it Chapter6 or Fitness for Fun:
  1. Import the Mapbox Unity asset file into the project:
  1. This will probably take some time to install:

  1. Right away, after the installation, you should notice a new menu item called Mapbox. This opens up quite a few new features that are exposed for us to play with:
  1. Mapbox gives us Atlas Template Generator, Clear File Cache, Setup, and Map Editor options:
  1. The Mapbox Atlas Template Generator is a tool that allows you to create and test custom map atlases:
For every item we look at in this section, exit from it immediately after taking a look at it so we can continue. We will revisit the items we need when building the project.
  1. The Map Editor allows you to visualize the underlying data structure of the maps you create and use:
  1. In addition to that, the Map Editor’s data is tied directly to the Map object’s Abstract Map Script. Any changes you make to the Abstract Map Script data is reflected in the Map Editor, and any changes you make in the Map Editor are reflected in the Abstract Map Script’s data:

  1. The Mapbox Setup option allows you to select Example scenes or Map Prefabs, however, this can only be accessed after you copy and paste your Access Token and submit the information. This will require you to be connected to the internet for verification: