Passing Array to normal Raycast and using RaycastNonAlloc ¿Same thing?

So, yeah, I read the documentation, but still. I wonder
There IS an overload version of the Basic “Physics2D.Raycast” where you pass a prealocated array and it returns an int with the number of hits (just like “NonAlloc” version)
But it does not explicitly say that there is no allocation in the docs (like it says in the “Physics2D.RaycastNonAlloc”).

So, basically ¿Does somebody know if this overload version of Raycast is actually the same or not to RaycastNonAlloc?


Physics2D.Raycast requires a ContactFiter2D, while in Physics2D.RaycastNonAlloc you pass the layerMask, minDepth and maxDepth. Internally, both make a call to the same method.