Hi Cesium Team,
I have some Cesium3DTileset in my level, in play mode, it takes dozens of seconds to load. When I want to destroy the Cesium3DTileset, the game will block for some time, however, if the Cesium3DTileset has loaded completely, it can be destroyed immediately.
Can I know the callback of Cesium3DTileset loading? I want to know when it loaded completely, or Can I pause the process of Cesium3DTileset rendering? I have tried toggle the “Suspend Update”, but it seems like just pause the tile loading, it still block the game when I destroy the Cesium3DTileset and when loaded completely, it can be destroyed immediately.
Hope your response.
When a Tileset is destroyed, the destructor blocks until all in-flight HTTP requests complete. Usually that’s no more than a couple hundred milliseconds, but it can be longer from a slower server.
One thing you can try to speed it up is to cancel all the in-flight HTTP requests before destroying the tileset. From C++,
FHttpModule (which you can obtain with
FHttpModule::Get()) has a
Requests field. You can loop over all the requests and call
CancelRequest on each. The tricky part will be if you have multiple tilesets (some of which you don’t want to cancel) or other things using the FHttpModule and that should not be canceled. You should be able to examine the URL of each request to decide which to cancel.
We’re also working on progress reporting for Tilesets, so you could at least time your destruction of the tileset to when now loads are in progress. I expect that will ship in the next release (early August) or two (early September).