check collision unity C# 2d code example
Example 1: check for collision unity c#
void OnCollisionEnter(Collision col) { }
Example 2: collision detector unity c# 2d
void OnCollisionEnter2D(Collision2D coll){)
void OnCollisionEnter(Collision col) { }
void OnCollisionEnter2D(Collision2D coll){)