Cesium for Unity Version 1.0.0 memory exception

Cesium for Unity Version 1.0.0.

editor mode:only terrain
runtime mode : terrain and 3dtiles

Initialize and start Unity,the memory is 2.2GB.

Switching back and forth between running mode and editing mode,During running mode, the camera will be operated,View 3dtiles.

After several consecutive attempts,return to editing mode,the memory is 5GB.

Run multiple times,memory may continue to rise.

But version 0.3.1 does not have this issue.After several consecutive attempts,return to editing mode,the memory is 2.2GB.

1 Like

Thanks for the report @luo. I can reproduce the results on my machine.

I think it has to do with an object-pooling PR that made it into the 1.0.0 release: Add object pooling by ZackOfAllTrades · Pull Request #244 · CesiumGS/cesium-unity · GitHub. If I undo the changes made by that PR, the memory will reset every time it enters Play Mode. The mesh pool is expected to expand when you load more meshes, but it seems to happen even if I don’t move the camera around much. We’ll have to look into this to figure out what’s going on.


Just to update, a fix for this was included in the Cesium for Unity v1.1.0 release!