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

Custom vector visualizer not working

Open thecommonegret opened this issue 8 years ago • 9 comments

Hi, I am trying to utilize NYC's street tree dataset (Mapbox tileset uploaded here) to visualize in a Manual Alignment AR scene, but can't seem to get them to appear. I'm currently just using the diameter of the tree (property: tree_dbh) as the extrusion value (which I know doesn't make much sense, but just trying to get something to show up). One thing I noticed is that all properties of the tileset are being read as strings even though some are just numbers. Maybe this is the issue? I uploaded into Mapbox as a geojson file. Ideally I'd eventually like to have these street trees appear as green, yellow, and red 'cylinders' according to their recorded health, as styled here

tileset in Mapbox: image

setup in Unity: image

Running latest Unity and Mapbox SDK versions. Will eventually build out to mobile.

Thank you, Matthew

Note: If this is a bug or support ticket, please provide the following information:

  • Unity version:
    • Scripting Runtime Version:
    • Scripting Backend:
    • Api Compatibility Level:
  • Mapbox SDK version:
  • The platform you're building to:
  • A description of what you're trying to do:
  • Steps to recreate the bug if appropriate:
  • Links to your logs are also helpful:

thecommonegret avatar May 14 '18 13:05 thecommonegret

@jordy-isaac will 1.4.2 sdk update today?? because I saw the changelog changing.

willychang21 avatar May 15 '18 10:05 willychang21

@willychang21 Yes, 1.4.2 did release and it has some great POI feature additions. You should check it out.

As for your ticket. When you run the game are the game objects from your visualizer appearing in your hierarchy and just not being rendered in the scene/game views?

The data type being a string could be the issue as the height under Extrusion Type comes from the Mapbox Streets tileset and is an number.

jordy-isaac avatar May 15 '18 12:05 jordy-isaac

@jordy-isaac I opened the file sdkproject in mapbox-unity-sdk-develop but there's some error image image how to fix it??

a100447739 avatar May 15 '18 13:05 a100447739

@jordy-isaac The game objects do appear to be showing up in the hierarchy when I run the game. See below:

image

thecommonegret avatar May 15 '18 13:05 thecommonegret

@jordy-isaac Thanks,i figure it out!!

willychang21 avatar May 16 '18 00:05 willychang21

@thecommonegret In the screenshot your tileset contains only points, but in unity you have selected primitive type as line . Line mesh generation needs minimum two vertices. Could you change primitive type to point and use a prefab modifier to place cylinders at feature locations and try?

abhishektrip avatar May 16 '18 06:05 abhishektrip

@a100447739 you are missing dependencies in your project. Please run the update-mapbox-unity-sdk-core (bat or sh depending on your platform) script to pull all the dependencies.

abhishektrip avatar May 16 '18 06:05 abhishektrip

@a100447739

you are missing dependencies in your project

See ReadMe: https://github.com/mapbox/mapbox-unity-sdk#from-this-repository-advanced-latest-development

wilhelmberg avatar May 16 '18 07:05 wilhelmberg

Closing this issue for now. Please re-open if you're still having trouble.

jordy-isaac avatar May 17 '18 19:05 jordy-isaac