Cesium Access Token Issue When Spawning Component at Runtime

Hi Everyone,

We are encountering an issue with the Cesium Access Token system since the release of v1.10.xx which added the token dialog.

Previously we were able to dynamically add and destroy Raster Overlay Components on 3D Tilesets. However, now when we spawn a component and set all the required fields with correct and valid values that work when adding a component in editor either of two things happen:

  1. the token helper dialog spawns multiple instances with a message to say the token may not be valid.
  2. the overlay component will correctly be added, but it initializes using the default value of Asset ID 0 which throws an error not type IMAGERY as it’s trying to load the terrain into a raster overlay.

Possibly what has happened is that the component is checking the token value before being set and throwing an error and then exiting out to show the dialog.

In the screenshot you can see the asset ID is showing as being set after the type check as it correctly shows the ID in the error, but changing the inital value in the add component node changes the output error.

Does anyone else experience this and is there a work around known?

LogCesium: Loading tileset for asset ID 1
LogCesium: Loading tileset for asset ID 1 done
LogCesium: Error: [2022-02-10 09:48:40.789] [error] [RasterOverlay.cpp:145] Ion raster overlay metadata response type is not 'IMAGERY', but unknown

Thanks for the report @V2i, we’ll investigate. I wrote an issue for it: https://github.com/CesiumGS/cesium-unreal/issues/755

Something quick to try that might help: what happens if you put your SET node that sets the Ion Asset ID last? Cesium for Unreal won’t try to load an ion overlay without an asset ID, so I think that will avoid any errors from a partially-constructed overlay.

As currently written, the first two SET nodes (Material Layer Key and Ion Asset ID) put the overlay into a state that is “valid” as of 1.10. It’s just asking Cesium for Unreal to use the project default token. If that doesn’t work out (because the token is invalid for this overlay), it’s arguably doing the correct thing by popping up the troubleshooting panel. That’s true even if there is no project default token, because one purpose of the troubleshooting panel is to help you get set up with one.


Sorry, I’m not quite sure what you mean by unsubscribed. If you just mean you’re not getting notifications, I believe you can fix that with the dropdown at the bottom of the thread:

If you want to subscribe to threads more generally, I believe you can do by clicking your profile picture in the top right and choosing Preferences and then Notifications.

Hi @Kevin_Ring ,

We have tried changing the set order but it still produces the same result.

It makes sense that if the token is invalid to correctly present the token troubleshooter, however in the screenshot you can see that after spawning a single component with the SET Material Layer Key and SET Ion Asset ID last, the troubleshooter is spawned multiple times which is not ideal.

I opened a pull request to address this:

You can try it by clicking “Show All Checks” at the bottom, clicking the Details link next to your UE version, uninstalling the existing Cesium for Unreal via the Marketplace, and extracting the ZIP file to the Engine/Plugins/Marketplace directory.

By the way, you will also likely need to add a call to the Refresh function on the overlay after you have created it and set its settings via Blueprints.

Great thanks we’ll give it a try.

We have been calling a refresh on the new components/tileset as needed.