Regarding the issue of importing models using Cesium

Hello everyone, I am using Cesium v1.118 to import a 3D Tile model, here is my code: const tilesetModel = Cesium.Cesium3DTileset.fromUrl('http://172.26.92.192:8062/tileset.json'); viewer.scene.primitives.add(tilesetModel); However, this code did not work correctly and returned the following error message in the screenshot :


I can’t understand, how did this happen?

The fromUrl function returns a promise to the tileset. So the line should be

const tilesetModel = await Cesium.Cesium3DTileset.fromUrl('...');
//-------------------^  note the 'await' here!