Physcis2D.RaycastNonAlloc allocate memory

I am using Unity 5.0.1p4 and it seems that Physics2D.RaycastNonAlloc alloc memory. Is this normal? Attached profiler image.

I discovered the exact same thing.

It absolutely should not and I can’t see what would cause it either. I just ran a few tests here (including 5.0.1p4) and I can’t duplicate the issue.

Would you mind submitting a bug report with a simple project attached that demonstrates this and give me the case number?

I made bug report with simple project to reproduce issue. This happen also with Unity version 5.0.2f1.
(Case 698531) Physcis2D.RaycastNonAlloc allocate memory.
It seems that alloc occurs when raycast hits collider.

1 Like