Question: How can I add a custom building?
Hi everyone, following the example for the replace feature posted here I was able to replicate the described behaviour on my implementation of a map. Trying with the coordinates for the Empire State Building works perfectly. Then I tried to replace "Arena di Verona" in Italy with the same building prefab but to no avail, am I missing something? Reading the description of the example:
This example demonstrates how you can use the ReplaceFeatureModifier to swap out a default extruded building with a custom 3D object. With this modifier, you can replace your corporate office locations with a branded building model, or spawn a highly detailed 3D object in place of a famous monument or building.
I saw that I could replace even a corporate office. Am I missing something? Do I need something else, like a custom map id that already has data on the buildings I want to then customize?
Thanks in advance!
- Unity version: 2018.1.5f
- Mapbox SDK version: 1.4.5
I found out how to solve this issue, as I thought I had to create a custom dataset and add a polyline in the place of my building to then being able to replace it with a custom modifier. I'm closing this issue.
@AzeExMachina I know its been a while, but can i ask how you came to this solution. I was able to load my modifier after folwwing your steps, but there is no indication of this in any of the documentation.
@Zouron It was actually a process of exploring the mapbox' api through code, I thought that the properties would have been inside the layer of a tile. I then made attempts to load such properties and found what I needed. It was not documented anywhere. I got to the part about the custom dataset and polyline thing after making a couple of attempts of adding buildings, I saw that it was related to points already inside the data and that I could add mine