ontriggerenter call code example
Example 1: ontriggerenter
void OnTriggerEnter (Collider other) //Make sure to put this out of Voids
{
if (other.gameObject.tag == "Object")
{
Debug.Log ("Collided");
}
Example 2: ontriggerenter
private void OnTriggerEnter(Collider other)