using collider trigger in script untiy code example
Example: unity on trigger enter
//for unity c#
private void OnTriggerEnter(Collider other)
{
// code
}
//for unity c#
private void OnTriggerEnter(Collider other)
{
// code
}