triggers unity code example
Example 1: unity on trigger enter
//for unity c#
private void OnTriggerEnter(Collider other)
{
// code
}
Example 2: how to use triggers in unity
//for collision detection
void OnCollisionEnter(Collision collision)
{ }
// for use of triggering
void OnTriggerEnter(Collider other)
{}