imaakp.blogg.se

Mapbox unity
Mapbox unity





mapbox unity

Unfortunately, it seems a bit like MapBox has stopped developing and maintaining the Unity SDK, the latest commit is from February 2020, but maybe they will get back to it at some point. Maybe it is a bug in the MapBox code - I don't know. I initially assumed that the OnUpdated would be such an event - the name sort of suggests it - but it doesn't seem to be so. It would be nice with some built in event when all tiles are finished, but I haven't been able to find such an event. At least it seems that I can rely on the terrain data (for the given tile) being loaded at that time, so I would guess that the building data (for the given tile) would also be loaded.

mapbox unity

I solved it in somewhat hacky way by using the OnTileFinished event, which will be dispatched for each loaded tile whenever it is done with it's processing. You would think that when OnUpdated is dispatched, all processes related to the map updating are done, but, apparently, that is not the case. Buildings were modelled via Mapbox topographic data, and. I had a similar issue trying to access the terrain elevation data on OnUpdated, but it seems that it is not necessarily available at the time when OnUpdated is dispatched. Mapbox for Unity provided georeferencing support and OpenStreetMap (OSM) data for layers.







Mapbox unity