Currently if you duplicate an animator and its associated motions (to a new folder, or duplicate a folder with motions and animator inside) the Animator will keep references to the motions in the folder it was duplicated from.
Would be nice if the duplicated animator referenced the motions that it was duplicated along with.
Each duplicated set needs to be relinked by hand currently, which can be a lot of work when dealing with a large amount of animated items that need identical animators
Have you looked into AnimatorOverrideController? It’s specifically targeted at cases where you have multiple entities that all need the same Animator graph but different actual animation clips.
Thanks for the link.
So in theory it’s possible to tell an object to use different Motions with the same animator as other objects?
One draw back with the Unity editor is that it doesn’t tell you which Animator you are editing, theres no label in the editor and the hierarchy because de-focussed as you inspect animators.
This leads to a lot of confusion when editing animators for multiple objects with the same animation setup.
Also Motion clips cannot be edited without being linked to an animator. So even if the animator can be redirected to play different motion clips in code, the clips need to be setup with the right sprites somehow, they need to be linked to an animator for this.
I hope this makes sense. There needs to be more clarity in the animation system about what is being animated, and some kind of procedure to create/edit Motion clips without them being in an Animator to use the function suggested.
My specific case is 2d sprite animation, but I’m sure this relates to other large projects with animation.
Edit:
(ah, Animator editor tells you the file you are working on in bottom right.)
Precisely. In the Inspector for the object, the Animator component should have a slot for an override controller to be plugged in. The override controller essentially does a ‘find-and-replace’ on the animation clips that are used by that object.
The problem is, the animation system needs a context for editing an animation clip - it needs to know which transforms and components are even available to be animated, and what their relationship is to the root object being animated. At the moment this is done through putting the Animator component on the root.