3D Tileset get polygon id

I have a 3D Tiles asset with polygons. I set attributes of each polygon on xml (ex:"< gen:value>Some_attribute</gen:value>") , and i want to find the ID from each polygon createad, all polygons have a label with ID. I make an “Cesium3DTileStyle” to determinate the color, but i need to know where to find the ID. Can someone help me?

Welcome to the Cesium Community!

You can add styling to 3D Tiles by getting the name of the attribute you want to use as styling condition, like this:

${material} === 'glass'", "color('skyblue', 0.5)"

This grabs the material attribute of each building, compares it to ‘glass’, and if the condition is true, it will color the building a semi-transparent sky blue color. You can read more about styling 3D Tiles here: Styling and Filtering 3D Tiles | cesium.com

For your specific case, you can get the ID attribute (make sure it exists by clicking on the polygons and looking at the metadata infobox that pops up) by doing something like ${ID} === ####, 'color("red")'.