Hey @Kevin_Ring
I am trying to add CesiumWebMapRasterOverlay actor component dynamically to Cesium3dtileset using level blueprint.
Here is the snapshot of my Level blueprint logic. But its not able to attach Actor component to my cesium3dTileset.
Hey @Kevin_Ring
I am trying to add CesiumWebMapRasterOverlay actor component dynamically to Cesium3dtileset using level blueprint.
Here is the snapshot of my Level blueprint logic. But its not able to attach Actor component to my cesium3dTileset.
Hi @Aankit_K,
I just want to confirm: are you setting the variables on the overlay, including the base URL? Could you please share that Blueprint code as well?
There is an easy way to add or remove any RasterOverlay from a 3DTileset Actor including CesiumTileMapServiceRasterOverlay, CesiumWebMapServiceRasterOverlay or CesiumWebMapTileServiceRasterOverlay .
Here is an example of CesiumTileMapServiceRasterOverlay in LevelBlueprint
In Unreal Editor , set up the RasterOverlay well.
Event BeginPlay, get the reference of RasterOverlay and store the value in a variable such as TMSRasterOverlay, WMSRasterOverlay, WMTSRasterOverlay
To Remove it , get the RasterOverlay variable and call the node" Remove from Tileset". You even don’t need to Refresh Tileset.
To Add it , get the RasterOverlay variable and call the node" Add to Tileset". You even don’t need to Refresh Tileset either.
We recommend calling Activate
and Deactivate
instead of AddToTileset
and RemoveFromTileset
. The documentation on the latter two methods was recently updated to say this. The problem with using AddToTileset
/ RemoveFromTileset
directly is that the state isn’t persisted. If the Cesium3DTileset refreshes after you call RemoveFromTileset
, then the overlay will reappear. You may also want to set “Auto Activate” to false if you want the overlay to initially be hidden.