Hi everyone,
I’m using Cesium for Unity with Unity 6000.3.5f2 (the latest Unity 6 preview) and loading large 3D Tileset services (e.g., detailed city models with millions of triangles). I’m facing severe memory issues:
-
Memory usage (both managed and native) skyrockets during tileset loading.
-
Even after removing the tileset from the scene, memory does not drop back to its baseline. Over time, loading/unloading multiple tilesets causes out‑of‑memory crashes.
-
I’ve noticed that when I drag the camera to load multiple tile regions, the number of loaded objects (tiles) keeps increasing steadily. Setting
maximumCachedBytesto a low value does not prevent this continuous growth – the tile count and memory usage keep rising regardless. -
Calling my removal method (see below) does not immediately reduce memory usage; the profiler still shows large native allocations for textures and geometry buffers.
Here is the removal code I’m currently using:
csharp
Cesium3DTileset tileset = threeDTilesLayerDic[data.layerIds[i]];
threeDTilesLayerDic.Remove(data.layerIds[i]);
overlayLevelRanges.Remove(data.layerIds[i]);
if (tileset == null) return;
tileset.suspendUpdate = true;
tileset.maximumSimultaneousTileLoads = 0;
tileset.maximumCachedBytes = 0;
tileset.Dispose();
Destroy(tileset.gameObject);
I expected that setting maximumCachedBytes = 0, calling Dispose(), and destroying the GameObject would release all GPU and CPU resources, but that doesn’t seem to happen.
Attached screenshots:
-
Figure 1 – Memory profiler snapshot showing the high memory usage after loading a large tileset.
-
Figure 2 – The progressively increasing tile/object count as I pan/zoom over different regions, despite
maximumCachedBytesbeing set low.
My questions:
-
Is there a recommended, reliable way to completely unload a
Cesium3DTilesetand free all its associated resources (native textures, vertex buffers, etc.)? -
Does
Dispose()fully release native resources, or do I need to call additional cleanup methods (e.g.,Resources.UnloadUnusedAssets(),GC.Collect(), or manually destroy materials/meshes)? -
Is my disposal sequence correct? Should I disable the tileset’s update loop before disposal, and is there any specific order to follow?
-
Why does
maximumCachedBytesnot cap the memory growth effectively when panning over new areas? Are tiles being retained in some internal cache that ignores this setting? -
Is the delayed memory release expected due to Unity’s resource management, or is there a known bug in Cesium for Unity with Unity 6000? If so, are there workarounds?
I’m using the latest Cesium for Unity version (as of June 2026). Any insights, code examples, or configuration tweaks would be hugely appreciated. Thank you!

