How can I make Unity's overridable events appear within the Intellisense dropdown in Visual Studio (C#)?

I’m new to Unity, but familiar with C#. When I create a new C# script that opens in Visual Studio, I get Intellisense for everything except for overridable events.

For example, while working with collision, I expect to see events like “OnCollisionEnter”, “OnCollisionExit”, and “OnCollisionStay” within the dropdown. However, if I type “override”, the only selections I see within the dropdown are “Equals(object o)”, “ToHashCode()”, and “ToString()”.

Also, hovering over any term shows the usual tooltips, but hovering over something like “OnCollisionEnter” shows nothing at all. It’s as if the system recognizes it, but won’t tell me how or why.

What am I doing wrong?

Uhm you can’t because they are not overridable functions ;). Unity send messages to your scripts. Unity even optimises this message sending that messages are only send to classes which have a certain method. The MonoBehaviour base class doesn’t have all those callbacks.

When working with Unity you should always have your browser open with this page :wink: