Hi - I am pretty new to Unity but I have been able to find my way around. However, I have encountered a problem and no matter how much I google I can’t seem to find a solution that works. I am probably just doing something silly. Any help would be appreciated.
So what I am trying to do is to create a 2D map in unity. This map will be used to navigate through a 3D world. The map must be clickable because I will start with a world map and then based off the user’s click, the map needs to change to that country’s map. I have talked to different people and the way I want to go is with shapefiles since they already contain the information as to where the country and state boundaries are. In addition, I know I will have to work with shapefiles in the future so I figured I would just get some practice with them now. I wanted to start small so I downloaded a zipfile that contained the shapefile for the united states. I downloaded QGIS per a forums instructions and opened the shapefile in that software. In QGIS I was able to highlight individual states as shown in the photo below
Now I want this same functionality in Unity, except I don’t just want to highlight it, I also want it to be clickable and to be able to identify that state as Montana.
So from here I was able to converted this file to a DXF and then converted that to an FBX. But after that I am lost. I am not sure I even had to do those conversions.
If anyone could help me in this endeavor I would great appreciate it! Again I am new to Unity so if you could keep that in mind I would greatly appreciate it.
are you in general able to put a few clickable sprites on screen and say output a different message when you click on them? If not, the learn section will help best.
Or is your question related how to put the individual polygon colliders?
Hi Thanks. I can do that but my question is how can I use a shapefile to make the map. I don’t want to have to go through and make each country and state clickable by putting colliders on them by hand, especially because they are all different shapes and sizes. I want to just take the information from the shapefile and have a clickable map.
Yea I think you are right that I am losing the metadata because the shapefile is a zipped folder but I am not taking all the files from the folder just the .shp and converting it. But I just looked at mapbox and checked to see if I could upload shapefiles and I can! Do you think that would be the best idea then? Upload the shapefile to mapbox and then use the plugin in unity. Do you think the ability to click on states will still be there when I put it in unity?
Ok great yes that was a great idea! I looked into it and it seems like that is a great idea. They just released a beta plugin that I am going to try. Thank you!
Hi I was wondering if anyone had any experience with mapbox plugin for unity. It’s new but I am having a hard time trying to figure out how to use it for what I want. It is probably just due to my lack of unity knowledge. Does anyone know how to just get a map of the whole world that is zoom enabled from mapbox to unity? Anything would be appreciated. I am really struggling