In my Cesium for Unity project, after I modify a resource’s position or transform information on the Cesium ion website, the changes are not reflected in Unity when I refresh or re-add the resource. The position only updates after restarting the Unity Editor.
I suspect this is related to caching. Is there any way to force Cesium for Unity to refresh or clear its cache so that the updated position information from Cesium ion is loaded without restarting the editor?In my Cesium for Unity project, after I modify a resource’s position or transform information on the Cesium ion website, the changes are not reflected in Unity when I refresh or re-add the resource. The position only updates after restarting the Unity Editor.
I suspect this is related to caching. Is there any way to force Cesium for Unity to refresh or clear its cache so that the updated position information from Cesium ion is loaded without restarting the editor?
Unfortunately, there is currently no built-in way to do this. Cesium for Unity caches Cesium ion asset endpoint responses per process. This is “good” in that helps to avoid using extra sessions of things like Google Photorealistic 3D Tiles when entering Play mode, etc. But it is inconvenient in this case where you’re trying to tweak the location of your own tileset.
As a workaround, you can clear the request cache manually. It’s a sqlite database, stored in a file named cesium-request-cache.sqlite in Unity’s Application.temporaryCachePath. On my system and for the cesium-unity-samples project, that maps to %temp%\Cesium\cesium-unity-samples\cesium-request-cache.sqlite.
Once you find it, you can open it using the sqlite3 command-line utility, which you can get here:
(Look for the Command Line Tools for your platform)
Run sqlite3 D:\temp\Cesium\cesium-unity-samples\cesium-request-cache.sqlite to open the cache database. Then clear the cache by executing: