1. A concise explanation of the problem you're experiencing.
I have multiple tilesets loaded but not able to detect which tileset has been picked or visible, the piked feature returns 'object' but I'm not able to get any further information about the parent tileset.
2. A minimal code example. If you've found a bug, this helps us reproduce and repair it.
var tileset1 = new Cesium.Cesium3DTileset({ url: 'myB3DMtileset1' });
viewer.scene.primitives.add(tileset1);
var tileset2 = new Cesium.Cesium3DTileset({ url: 'myB3DMtileset2' });
viewer.scene.primitives.add(tileset2);
var handler = new Cesium.ScreenSpaceEventHandler(viewer.scene.canvas);
handler.setInputAction(function(click) {
var pickedObject = viewer.scene.pick(click.position);
if (Cesium.defined(pickedObject) {
//how to detect which tileset is picked, tileset1 or tilset2?
}
}, Cesium.ScreenSpaceEventType.LEFT_CLICK);
3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
In case multiple tilesets are loaded, I want to get the custom properties or name of the tilset that is either picked by mouse or is visible to the camera.
4. The Cesium version you're using, your operating system and browser.