Unity OnTriggerEnter code example
Example 1: unity on trigger enter
//for unity c#
private void OnTriggerEnter(Collider other)
{
// code
}
Example 2: ontriggerenter
private void OnTriggerEnter(Collider other)
Example 3: respawn ontriggerenter unity code
var spawn : GameObject; function OnTriggerEnter(other : Collider) { if (other.tag == "FirstPerson-AIO") { other.gameObject.position = spawn.transform.position; } }