Question by
Lewaro · Jul 27, 2016 at 11:07 AM ·
animation2dinstantiateanimator
Involve Instatiated objects in Animation
In the 2d-game the player should be able to shovel some dirt when he stands on a dirtpile. player allready has the animation for that, but the shovel has to be generated.
So i generate the shovel and trigger the animation. but the animator doesn't animate the shovel. Any solutions?
Comment
Best Answer
Answer by Lewaro · Jul 27, 2016 at 05:03 PM
Ok, so i found the answer my self. before Triggering the animation event Rebind the Animator.
Animator anim = player.GetComponent<Animator>();
anim.Rebind();
... why are my questions never answered?