Enabling EdgeCollider2D When Attacking is Not Triggering OnTriggerEnter2D Function Everytime

I’m working on a unity2D 2D platformer and I’ve got a player sprite that can swing his sword to do damage.

I’ve got an EdgeCollider2D attached to a child object of the player and this traces the player’s sword swing.

The EdgeCollider2D is disabled unless player hits melee button, the EdgeCollider2D appears properly when hitting the melee button but only triggers the OnTriggerEnter2D function the first time he swings and after he turn around and back around.

I call this function in the melee attack animation event,

public void MeleeAttack()
{
SwordCollider.enabled = true;
}

and this animation behavior is attached to the melee attack animation

override public void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
    {
        animator.ResetTrigger("meleeOne");
        Player.Instance.SwordCollider.enabled = false;
    }

finally, this is the OnTriggerEnter2D method being called in the sword collider script,

void OnTriggerEnter2D(Collider2D otherCollider)
    {
        Debug.Log(otherCollider.name);
        //Destroy(otherCollider.gameObject);
    }

I realized what it was, it was the rigid body of my player falling asleep and causing its child gameobject with the EdgeCollider2D component attached to it to fall asleep as well. I set the rigid body of the player to never sleep and the triggers occur as expected.

Whew, I’m sure I got some grey hairs from this one.