unity on trigger enter not working code example
Example 1: unity on trigger enter
//for unity c#
private void OnTriggerEnter(Collider other)
{
// code
}
Example 2: void ontriggerenter not working
2D for 2D (OnTriggerEnter2D) and 3D for 3D (OnTriggerEnter)
at least one object needs to have rigibody, and collider set to isTrigger
yea and this is for unity game engine only
Example 3: void on trigger enter unity
void OnTriggerEnter(Collider other){}