How to show the only selected entity and its info box when I click on it

I have many entities, and I want to show the only selected entity and its info box when I click on it. How to hide other unselected entities and only show the selected one and the base map.
I have read the tutorial and the sandcastle sample, but I still have no idea how to show the only selected entity and its info box when I click on it.

Please help me solve the problem, thank you so much!!!

I would keep a JavaScript array of all the entities, and each time you click, go through that array, and hide all the entities except the one that isn’t selected. You can find out if an entity is selected by checking if viewer.selectedEntity is defined (see https://cesiumjs.org/Cesium/Build/Documentation/Viewer.html?classFilter=Viewer#selectedEntity). This also tells you which entity is selected, so you can use an ID property on each entity to compare them. Finally, you can hide/show an entity using the show property (see https://cesiumjs.org/Cesium/Build/Documentation/Entity.html#show).

Hope this helps! This looks like a cool application - what’s it for? Are you using Cesium ion to create your 3D Tileset?