Boxing c#
This article explains boxing and unboxing in C#, why boxing creates heap allocations and GC pressure, and why that can hurt Unity performance. It shows common boxing cases such as Debug.Log, using structs with object, interfaces, generics, LINQ, foreach, and events, then gives practical ways to avoid boxing, check for it with the Unity Profiler, and keep Update-heavy code, Jobs, ECS, and other hot paths GC-free.