Animations on multiple part objects

I’m just started with animations.

I’ve made an animated door, which can swing open. Now, the ‘door-object’ is made by two seperate objects (door + doorframe = door-object). I animated the door (not the whole door-object) in blender.

In Unity, I have now the clips ‘door_opening’ and ‘frame_opening’ (I think to have the options of relative positioned animation).

The problem is, if I have the animator controller on the door-object, the animation works. But I’m aiming for the door-collider to activate the door. I need the script there.
The sounds are mady by functions called by animationflags. I want to keep it as simple as possible.

Now, if I put the animator to the door, the animation is playing, but the door isn’t moving. On that way, I can keep the sound and lock input script in the main door script.

Otherwise, I would have the door main script on the door, the sound script on the door-object and I would have to crosslink everything (not an elegant solution).

What options do I have?

Edit: just saw that:

63193-animator-missing.jpg

Why is it missing?

Plus: One of the animations was cut 2 frames before end. An Unity Answer said to fix select ‘clamp range’. Now the half of all the animations are broken… how can that happen?

The animations keep track of your object hierarchy, changing the hierarchy or moving the animations to other object with different hierarchy will cause this missing errors.

Try change the hierarchy of the door-object to this:

door-object
  +anchor <- place the animation scripts and colliders where
  |  +door (named Tür i guess)
  +doorframe

You can create the anchor object just by duplicating the door and then rename and remove all MeshFilter and MeshRender, then drag the door below.