Quantcast
Channel: Yudiz Solutions Ltd.
Viewing all articles
Browse latest Browse all 595

Add custom dataset points to Mapbox map and integrate them in Unity

$
0
0

Overview

This article explains you the procedure to add custom dataset points in Mapbox map and then implement those points in Unity3D.

Please go through this first if you are not aware of designing Mapbox maps and integrating them in Unity.

We will use Mapbox datasets and tilesets to add points to our map.

What is Mapbox Dataset?

A dataset is an editable collection of GeoJSON features hosted in your Mapbox account. Datasets can be created, modified, and deleted in Mapbox Studio or through the Datasets API.

What is Mapbox Tileset?

Tilesets are a format for displaying your dataset in maps.
Tilesets are lightweight collections of vector data that are optimized for rendering in a map and are not editable.

Let us create a dataset and use it in our map.

Go to Datasets section.
Click New dataset to create a dataset.
Click the “Draw a point” icon and add a point in your map.
Once you are done adding and editing features in your dataset, open Tilesets section.
Create a new tileset from your dataset.

Now open Datasets section again and add a new point in your map.
Click on “Export” and now you can see that you can update your connected tileset directly.

Open Tilesets section and add your tileset to a map style in the Mapbox Studio style editor.
Create the new layer and now you can see your points in your map.

Go through this video to understand the steps to add dataset and tileset to our map

Let us integrate the tileset points inside Unity.

Now that we have created the Enemy tileset from our dataset.
Copy the Enemy tileset map id.
We will use this map id inside Unity.

Open Unity and click on Mapbox -> Clear Caches.

Now go through this video to understand the steps to add dataset points to Unity.

Finally, we can see that the two points that we added in our dataset is now accessible inside Unity.

Congratulations!
You can now add more points of different types to your dataset and then use those types as per your wish.
You are now capable of integrating Mapbox maps inside Unity.

If you have an idea for your next game or If you need any help in executing your concept, we will be more than happy to make it a reality. Contact Us.


Viewing all articles
Browse latest Browse all 595

Trending Articles