mapbox-unity-sdk icon indicating copy to clipboard operation
mapbox-unity-sdk copied to clipboard

How can I display the building's status using custom data?

Open pinebluemeta opened this issue 3 years ago • 1 comments

  • 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.

Screen Shot 2022-07-20 at 9 30 26 PM

To display the custom data in Mapbox, isn't other way there?

pinebluemeta avatar Jul 20 '22 13:07 pinebluemeta

@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)

brnkhy avatar Oct 17 '22 06:10 brnkhy