CesiumGS / CesiumGS/cesium-unity
b3dm tiles do not release mesh or memory on unload
- Dominant language
- C#
- Stars
- 535
- Forks
- 132
- Avg merge
- 6h 45m
- Merged PRs (30d)
- 1
Description
### What happened?
When loading a tileset with b3dm tiles, mesh and memory are not released when tiles unload. Memory grows continuously and is never reclaimed. GLB tiles unload correctly under identical conditions, confirming this is specific to the b3dm code path.
Expected behavior: mesh and memory are released when b3dm tiles unload, consistent with GLB tile behavior.
### Environment
Cesium for Unity version: 1.23.1
Unity Editor Version: 6000.4.1f1
Operating System: Not specified by reporter
### Reproduction steps
1. Start from a blank project with Cesium for Unity installed.
2. Add a Cesium3DTileset pointing at a tileset served in b3dm format.
3. Enter Play mode and allow tiles to load.
4. Move the camera far enough away that tiles unload.
5. Monitor memory usage — it does not decrease after unload.
For comparison: repeat with a GLB-based tileset. Memory releases correctly.
### Supporting evidence
Reported via community forum across two threads:
- https://community.cesium.com/t/46016
- https://community.cesium.com/t/46033
Reporter tested three cases (thread 46033):
- Case 1 — GLB + ktx2: mesh and memory release correctly ✓
- Case 2 — b3dm, no texture: mesh and memory do NOT release ✗
- Case 3 — b3dm + ktx2: mesh and memory do NOT release ✗
Cases 2 and 3 confirm the failure is b3dm-specific and independent of ktx2.
Contributor guide
Assessment
This issue has not been assessed yet.