I recently updated CesiumUnity from v1.8.0 to v1.14.1 and I am seeing some poor performance on the Quest 3. I made a development build and looked at the Unity profiler to see where the bottleneck is. I found that CesiumGlobeAnchor.Sync()
is getting called ~300 times per frame which is odd because I only have ~20 CesiumGlobeAnchor
in the scene.
I’m not explicitly calling CesiumGeoreference.AddGlobeAnchor
anywhere, so quite I’m confused by this call stack. Any idea what would cause this?
I’m periodically logging how many I have in the scene to be sure:
var globeAnchors = FindObjectsOfType<CesiumGlobeAnchor>(true);
Debug.Log($"globeAnchors.Length = {globeAnchors.Length}");
foreach (var globeAnchor in globeAnchors)
{
LogInfo($"{globeAnchor.gameObject.name} - active? {globeAnchor.gameObject.activeInHierarchy}");
}
This yields a log like this:
[2025-01-09 18:28:02.139]-> [Cs]globeAnchors.Length = 23
[2025-01-09 18:28:02.140]-> [Cs]MapAttacher(Clone) - active? False
[2025-01-09 18:28:02.142]-> [Cs]MapAttacher(Clone) - active? False
[2025-01-09 18:28:02.143]-> [Cs]MapAttacher(Clone) - active? False
[2025-01-09 18:28:02.145]-> [Cs]MapAttacher(Clone) - active? False
[2025-01-09 18:28:02.146]-> [Cs]MapAttacher(Clone) - active? False
[2025-01-09 18:28:02.148]-> [Cs]MapAttacher(Clone) - active? False
[2025-01-09 18:28:02.149]-> [Cs]MapAttacher(Clone) - active? False
[2025-01-09 18:28:02.151]-> [Cs]MapAttacher(Clone) - active? False
[2025-01-09 18:28:02.153]-> [Cs]MapAttacher(Clone) - active? False
[2025-01-09 18:28:02.154]-> [Cs]MapAttacher(Clone) - active? False
[2025-01-09 18:28:02.156]-> [Cs]MapAttacher(Clone) - active? False
[2025-01-09 18:28:02.159]-> [Cs]MapAttacher(Clone) - active? False
[2025-01-09 18:28:02.161]-> [Cs]MapAttacher(Clone) - active? False
[2025-01-09 18:28:02.163]-> [Cs]MapAttacher(Clone) - active? False
[2025-01-09 18:28:02.164]-> [Cs]MapAttacher(Clone) - active? False
[2025-01-09 18:28:02.167]-> [Cs]MapAttacher(Clone) - active? False
[2025-01-09 18:28:02.169]-> [Cs]MapAttacher(Clone) - active? False
[2025-01-09 18:28:02.171]-> [Cs]MapAttacher(Clone) - active? False
[2025-01-09 18:28:02.173]-> [Cs]MapAttacher(Clone) - active? False
[2025-01-09 18:28:02.174]-> [Cs]MapAttacher(Clone) - active? False
[2025-01-09 18:28:02.175]-> [Cs]MapAttacher(Clone) - active? False
[2025-01-09 18:28:02.176]-> [Cs]MapAttacher(Clone) - active? False
[2025-01-09 18:28:02.178]-> [Cs]FlockAnchor 1 - active? True