using UnityEngine; public class Obstacle : MonoBehaviour { // Start is called once before the first execution of Update after the MonoBehaviour is created void Start() { } // Update is called once per frame void Update() { } public void OnTriggerEnter2D(Collider2D collision) { Debug.Log("Test"); } }