The question is answered, right answer was accepted
Problems with using the same Animator Controller on multiple objects.
Hi,
I've got a weird problem with animations and how they are triggered. In my scene I have a number of objects, each duplicates of one another (or prefab-instances, doesn't matter). They all have the same components (and scripts) attached to them and also share the same Animator-Controller with the same animations. Now, when I trigger an animation (via GetComponent().SetTrigger("trigger")) on one object, what regularely happens is that the very same animation also gets triggered on a random number of the other objects in the scene, EVEN if those are in a mecanim-state with no transition at all to the animation that gets (wrongly) triggered. I really made sure and tested, that the trigger only gets fired on one(!) object, but other objects still get affected, seemingly at random.
I wonder, is this because I use the same Animator Controller and the same animations on all of the objects? Does every object need its own individual Animator Controller (or Animator Override Controller) ? Or is there something else that could cause this weird behavior?
Never$$anonymous$$d, in the end it was a problem with masks. They affected each other and so appeared as if "random" other objects get affected, too.
Follow this Question
Related Questions
Playing animation without hold the button 1 Answer
How to make character animate as he's rotating? 2 Answers
Is there a possibility to reuse substate machines in other animator? 0 Answers
Animator Controller sets default values even if Write Defaults is disabled 0 Answers
How do i extend a animation ? 1 Answer