Animating a box collider does not animate the mesh renderer.

Hello there. I’m fairly new to animating (and animating in Unity, especially), so as a test I imported a door mesh from another project, added a box collider to it and then animated it in Unity’s animation window by adding a couple of keyframes and rotating the door.

This appears to work fine, no problem when playing from the animation window and no problem with previewing the saved animation. However, when my script tells it to animate only the collider does so, while the mesh itself stays right where it was, allowing me to walk my character through it.

I’ve been looking all over and I can’t seem to find any posts or other questions with the same issue, so any help on this matter would be greatly appreciated, thank you.

i had the same issue, had to uncheck the “static” checkbox at the top-right of the inspector tab