1 my square has a rigid body 2D and a box collider 2D. my circle has a box collider 2D. The game manager script is just a code to spawn them. my catcher script is just to move the circle left to right.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class ArtDestroy : MonoBehaviour
{
private void OnCollisionEnter(Collision collision)
{
if (collision.gameObject.CompareTag("Art"))
{
Destroy(collision.gameObject);
}
}
}