Unity Issue Tracker - CharacterCollider's OnControllerColliderHit allocates 80B of GC
Fixed
UUM-60515
CharacterCollider's OnControllerColliderHit allocates 80B of GC
Unity: PhysX
Fixed
2023.3.X
Won't Fix
6.0.X
2023.2.X
2022.3.X
2021.3.X
Cancelling this 2023.2 tech release issue since the support for this release has come to end of life. Cancelling this 2023.2 port case does not affect any LTS or Unity 6 Beta/Preview that remain open.
We won't be backporting the changes done for Unity 6 into 2022LTS due to their inherent risk.
We will not be changing this behavior in older LTS versions as it can cause breakages in projects using these versions of Unity and relying on the fact that the ControllerColliderHit instance is not reused.
Reproduction steps:
1. Open the attached “Repro“ project
2. Open the “Assets/Scenes/Main.unity“ Scene
3. Open the Profiler window (Window > Analysis > Profiler)
4. Enter the Play Mode
5. Observe the “GC Allocated in Frame” value in the Memory category
Expected result: There’s 80B of GC allocated in each frame
Actual result: No GC is allocated