Detect collision immediately

Here’s the thing:
I have a cube that starts at some Z coordinate, and go forward 1 unit each time.
And then it detects the collision with some Mesh I have, that does not move at all.
Right now I have to “yield return null” so it waits for the next frame to detect the collision with “OnCollisionEnter”. Is there a way to detect the collision between the cube and the mesh in one frame?

I mean, I want the cube to go from its start position to final position and detect the collision each step, and all of that in 1 frame.

Is it possible?

Assuming I understand what you’re asking, no, you can’t “project hypothetical situations” in the same way you respond to collisions each frame. Not in any clean, smart way, anyway.

This type of problem - needing to know right now what will happen in the future - is generally solved by raycasting, spherecasting, or capsulecasting.