mapbox-unity-sdk
mapbox-unity-sdk copied to clipboard
How can I display the building's status using custom data?
- Unity version: 2020.3.36f1
- Scripting Runtime Version: vsCode
- Api Compatibility Level: NET4.0
- Mapbox SDK version: 2.0.0
- The platform you're building to: Android, IOS
I want to change the colors of the buildings according to the some states of custom data in Mapbox. However, the custom data is the response from my Api server(NodeJs). The flow is as like below; When the scene starts, I send the ids of buildings(Gameobject names in Unity scene) as request parameter to the api server. The server sends the data of the buildings to Unity. So, I display the colors of the buildings according to this data in scene.
But, the problem is how to know when the all buildings of the scene are loaded. Once all buildings are loaded, I can get all names of the buildings. I used OnUpdated event, but I can't get the names.
To display the custom data in Mapbox, isn't other way there?
@pinebluemeta I'm a little confused because we don't have consistent unique names for buildings or any feature in Unity. Is that something you generate? (maybe based on latlng or something)