How would I detect a collision between a rigidbody and a static

I have an object with a rigid body. How would I go around detecting collisions between this object and any other object with a collider on it?

I know you can enable/disable collision detection (https://docs.unity3d.com/ScriptReference/Rigidbody-detectCollisions.html). Is there an event that gets fired whenever an object collides?

My Rigidbody object:

A typical object that it would collide with:

Extra info: This is Unity 3D, with version 2019.4.8f1o on the Universal Render Pipeline

Is there an event that gets fired whenever an object collides?

OnCollisionEnter

//Automatically fired when a collision occurs
void OnCollisionEnter(Collision collision) {

}


This is something you could easily have found with a web search.

• I don't know how, I don't know why, but for some reason, I wrote this down to prove you wrong, because I have tested this in the past and it didn't work. I do not know what you did, but thank you. I have no idea how it suddenly works, but I am actually amazed. Thanks. – OskarZyg Aug 16 '20 at 17:50