I’ve got a code wich detects collision with my Cat object and then destroys itself.
But the mouse object is not disappearing.
void onTriggerEnter2D(Collider2D mcol)
{
if (gameObject.name.Contains("Clone"))
{
if (mcol.name.Equals("CAT"))
{
Destroy(this.gameObject);
}
}
}