Get the ID for individual buildings in a scene.
How to use the sample (SampleViewer)
- The SampleViewer Scene should open by default, if it is not open, click the SampleViewer scene to open it.
- Click play.
- Using the UI, enter an APIKey in the input field to the top left.
- Open the Samples drop down, and click HitTest to open the level.
- While holding shift, click a building. The building's ID's will show up on a 3D UI Component.
How to use the sample (HitTest Scene)
- Open the HitTest scene.
- Click on the ArcGISMap GameObject and set your API key in the Inspector window.
- Click play.
- While holding shift, click a building. The building's ID's will show up on a 3D UI Component.
How it works
- Create an ArcGIS Map.
- Attach an ArcGIS Camera component to the active camera.
- Create a new Gameobject and call it SampleArcGISRaycast.
- Attach the ArcGISRaycast script to the SampleArcGISRaycast GameObject.
- Enter your APIKey in the APIMapCreator.
- Hit play. Once the scene is running hold shift and click a building. The building's ID's will show up on a 3D UI Component.
About the data
Building models for New York are loaded from a 3D object scene layer hosted by Esri.
Elevation data is loaded from the Terrain 3D elevation layer hosted by Esri.
Tags
raycast, visibility