I’ve been looking into the character animation stuff. While I fully understand the “@” annotation to link an object to an animation, I wonder how I actually can share the same animation with several objects which are all based upon exactly the same skeleton.
To test this I did this:
I have an object with an animation that plays fine. The object file is named “Robo01_Body01.fbx” and the animation file is named “Robo01_Body01@pickup.fbx”. I can assign the animation to the imported object and it plays fine.
Now I took the file “Robo01_Body01@pickup.fbx”, copied it and renamed it to “dropit.fbx”. The animation is imported, but when I assign this animation to the “Robo01_Body01.fbx” object, the animation is not played as if the bone structure was not the same.
But I simply copied and renamed it. This leads me to the conclusion that I cannot simply have one animation file and assign it manually in Unity to different game objects (which share the same skeleton).
Are you copying and renaming the animation clip alone, or the entire FBX file? I’d recommend resaving the original file under a different name completely, just to be sure. You may be confusing the importer by renaming it by hand because of some data within the file. I’m not sure, but once you’ve done that you can just grab and drag the animation clip by itself into the animation list for whatever character you want in the Hierarchy view (as long as it uses the same skeleton).
I just did a new test, exporting the animation with only the bones selected, and naming the file “testit.fbx”. Upon import into Unity, the first bone of the skeleton (“attachupperbody”) is renamed to the file name “testit”. And the first visible bone in the imported object is “Bone16”, which is a child bone of my “attachupperbody” bone.
When using the “@” annotation, the first bone “attachupperbody” is not renamed and the first child of the “game object” is “attachupperbody” (see image).
Both files have been exported in exactly the same way.
The next image shows my actual animated asset (“Robo01_Body01”). “mitte” and “attachupperbody” are not linked to any parent in the scene. But since there are 2 actual root objects in the scene, Unity generates an artificial root game object to which the mesh object and the skeleton object are attached.
I think the actual confusion comes from this renaming of the root object, if only one root object is in the fbx file.