|
Hi guys, quick question: (I looked for it but could not find anything) I have a ton of objects and I need to add one animation to each, so instead of going one by one adding the Animation Component I just did it via Script: So now I want to add the an animation (the same for all) to every anim component. I cant get it working, i know it would be using AddClip. Can someone give me an example of how to do this? Thanks everyone :)
(comments are locked)
|

Just call AddClip and pass your clip. Which part doesn't work?
You have to pass the animation-clip's name as 2nd paramter. E.g. animation.AddClip( animationClip, animationClip.name ); I think that's what Unity is doing