Is there a way to animate the edge collider of my 2D character?

It is a 2D project in Unity 2018.4.8f1.
I can animate box colliders 2D without any problems, but with an edge collider 2D I can’t. If I try, the change is always applied to all frames of the sprite in every animation.

I use an Edge Collider 2D because the Box Collider 2D got stuck very often on the Tile Collider 2D of the Tilemap. (I also tried it with different materials. Apparently a bug.)

Hi Skeasy,
looks like animation of EdgeCollider2D has some limits. In the Animation window there are offered the properties

  • Densitiy
  • Edge Radius
  • Enabled
  • Is Trigger
  • Used By Effector
  • Offset.

The Points you can see in the Inspector and Scene View are not editable from the Inspector hence not animatable. So if the given properties are not meeting your needs you need another solution.

E.g. - If that would solve your problem, you could make different colliders and switch them on and off. OR: place the Collider on a child gameobject, which you then can scale, rotate etc.

See in the description of EdgeCollider2D - Points are readonly: