ontriggerenter2d unity example
Example 1: ontriggerenter2d
void OnTriggerEnter2D(Collider2D col)
{
Debug.Log(gameObject.name + " Collided");
}
Example 2: ontriggerenter2d
void OnTriggerEnter2D(Collider2D col)
{
Debug.Log(col.gameObject.name + " : " + gameObject.name + " : " + Time.time);
spriteMove = -0.1f;
}