Collision2d Unity Code Example
Example 1: unity 2d collision
void OnCollisionEnter2D(Collision2D col) { Debug.Log("Collided with: " + col.gameObject.name); }
Example 2: oncollisionenter2d
OnCollisionEnter2D(Collision2D Collider)
void OnCollisionEnter2D(Collision2D col) { Debug.Log("Collided with: " + col.gameObject.name); }
OnCollisionEnter2D(Collision2D Collider)
Comments
Post a Comment