Change Project Default Token at Runtime

Hello, I am trying to implement a feature where users can import a token that is different from the project default token and spawn assets from the token at runtime. I am having issues with changing the project default token. At the moment, I have a UI that displays all of the assets associated to a token. When I change the token(by changing the value stored in Ion Access Token) and attempt to spawn them, they do not spawn correctly. The asset exists in the world Outliner but upon clicking “Troubleshoot Token” the following appears.


At the moment, I am setting the Ion Access token inside of my Globe Default variable (of type Cesium 3DTileset) which appears to allow me to read what assets are associated with the token, but not access them (as seen in the image above).

If it is not necessary to change the project default token in order to spawn assets from a token that is different from the project default token, please let me know! This solution is just what I think would be the easiest in terms of my project. Thank you!

Hi @dyllan-aeroai,
Setting the project default token is probably the wrong approach here, because that doesn’t just affect new assets. It also affects any existing assets that are configured to use the project default token; they’ll suddenly pick up and use the new token, too.

To make Cesium for Unreal access a particular asset using a particular token, you just need to set the “IonAccessToken” property on Cesium3DTileset or CesiumRasterOverlayComponent. When this property is blank, Cesium for Unreal uses the project default token.