About the loading problem of `Cesium3DTileset(options) url`

I tried two different ways to create tileset.

const assetId = 8564
let tileset: Cesium3DTileset

//------ code 1 -------

tileset = new Cesium3DTileset({
    url: IonResource.fromAssetId(assetId )

//------ code 2 -------

const ionResource = IonResource.fromAssetId(modelData.assetId)
    (resource) => {
        tileset = new Cesium3DTileset({
            url: resource.url

code 1: Successfully loaded and displayed

code 2: Failed to load, got 401 or 404



Thank you for your question! The issue with the second code snippet is that the resource.url object is not being updated correctly. Thus when you try to use it as a URL, you get an error indicating that the compiler was not able to find the resource.


Thank you for your answer.

1 Like


Of course! I am happy to help out :grinning:

Please let me know if you have any other questions.