ontriggerenter unity 3d code example
Example 1: unity on trigger enter
//for unity c#
private void OnTriggerEnter(Collider other)
{
// code
}
Example 2: ontriggerenter
void OnTriggerEnter (Collider other) //Make sure to put this out of Voids
{
if (other.gameObject.tag == "Object")
{
Debug.Log ("Collided");
}
Example 3: ontriggerenter
Collider.OnTriggerEnter
Example 4: ontriggerenter
private void OnTriggerEnter(Collider other)