I am currently working on a platformer game that involves a death animation once the player has run out of health. I am wanting the player to be able to ignore 2d collisions with an enemy, as it is going through the animation. I have already tried using the code: Physics2D.IgnoreCollision(Player.GetComponent(), Enemy.GetComponent());
But this only works for a single enemy not all of them. I have attached the enemy prefab to the player under a game object, but still no luck.
Appreciate the Help