Animating the BoxCollider2D

Hello!

I have a BoxCollider2D in a parent gameObject. The Animator is in the ChildObject. I want to animate the BoxCollider2D. I think this means that the ChildObject needs a script that gets the BoxCollider2D so I can use it in the animator. But even tho I do
public BoxCollider2D m_collider;
And then drag the gameobject into the slot to get the collider, the collider doesn’t show up in the animator. Why?

public class CharacterAnimationListener : MonoBehaviour { public CharacterMovementModel MovementModel; public CharacterMovementView MovementView; public BoxCollider2D AnimateBoxCollider;

 public void OnAttackStarted(AnimationEvent animationEvent)
 {
     if (MovementModel != null)
     {
         MovementModel.OnAttackStarted(); 
     }
     if (MovementView != null)
     {
         MovementView.OnAttackStarted();
     }
     ShowWeapon();
     SetSortingOrderOfWeapon(animationEvent.intParameter);
     SetShieldDirection(animationEvent.stringParameter);
 }

 public void OnAttackFinished()
 {
     if (MovementModel != null)
     {
          MovementModel.OnAttackFinished(); 
     }
     if (MovementView != null)
     {
         MovementView.OnAttackFinished();
     }
 }
 public void ShowWeapon()
 {
     if (MovementView != null)
     {
         MovementView.ShowWeapon();
     }
 }
 public void HideWeapon()
 {
     if(MovementView != null)
     {
         MovementView.HideWeapon();
     }
 }

 public void SetSortingOrderOfWeapon(int sortingOrder)
 {
     if (MovementView != null)
     {
         MovementView.SetSortingOrderOfWeapon(sortingOrder);
     }
 }
 public void SetSortingOrderOfPickupItem(int sortingOrder)
 {
     if (MovementView != null)
     {
         MovementView.SetSortingOrderOfPickupItem(sortingOrder);
     }
 }

 public void SetShieldDirection(string direction)
 {
     if (MovementView == null || direction == "")
     {
         return;
     }

     switch (direction)
     {
         default:
             Debug.LogWarning("Shield direction '" + direction + "' does not exist.");
             break;
         case "Front":
             MovementView.ForceShieldDirection(CharacterMovementView.ShieldDirection.Front);
             break;
         case "Back":
             MovementView.ForceShieldDirection(CharacterMovementView.ShieldDirection.Back);
             break;
         case "Left":
             MovementView.ForceShieldDirection(CharacterMovementView.ShieldDirection.Left);
             break;
         case "Right":
             MovementView.ForceShieldDirection(CharacterMovementView.ShieldDirection.Right);
             break;
         case "FrontHalf":
             MovementView.ForceShieldDirection(CharacterMovementView.ShieldDirection.FrontHalf);
             break;
         case "BackHalf":
             MovementView.ForceShieldDirection(CharacterMovementView.ShieldDirection.BackHalf);
             break;
     }

 }
}

Can you post the script here?