Skip to content

On Trigger Enter 2D ​

Physics & collisionsDetailedOnTriggerEnter2D

A 2D collider enters this 2D trigger.

A 2D physics event: it happens when a 2D collider (Box Collider 2D and the like) enters this object's 2D area (a Collider 2D with Is Trigger on). It isn't for regular 3D colliders or players.

One of the two colliders needs a Rigidbody 2D. Both the area and the collider that came in get the event. For 3D areas, see On Trigger Enter (Collider).

Official docs: OnTriggerEnter2D (Unity)

Event values

Values this event has; action settings can use them as targets or values.

NameType
What enteredCollider2D

On a card

WhenOn Trigger Enter 2D⋯
What to do
+ Add what to do

In Udon

In UdonSharp, this is the method:

void OnTriggerEnter2D(Collider2D other)

In the same category