Dev Tools · 2h ago
Unity 6 Devs: ZLinq Cuts GC Allocs but Hot Paths Still Need Care
Unity 6's incremental GC reduces spikes but doesn't eliminate the cost of LINQ allocations in per-frame code. The article recommends avoiding LINQ in Update/LateUpdate, using ZLinq for frequent non-per-frame queries, and reusing preallocated lists for materialized results. Editor and startup code can safely use regular LINQ.
Meridian48 take
The advice is sound but not new; Unity devs have long known to avoid LINQ in hot paths, and ZLinq is a band-aid, not a cure-all.
Read the full reporting
LINQ and ZLinq in the Unity 6 Era: Avoiding GC Allocations in Large-Scale Projects →
DEV Community
unity-6gc-optimization