public void changeAnimClip(Animator_Clip_Pair anim, AnimationClip newClip)
 {
     AnimatorOverrideController ov_ctrl = new AnimatorOverrideController ();
     ov_ctrl.runtimeAnimatorController = anim.animator.runtimeAnimatorController;
     ov_ctrl [anim.getClip()] = newClip;
     anim.setClip (newClip);
     anim.animator.runtimeAnimatorController = ov_ctrl;
 }
    public void changeAnimClip(Animator_Clip_Pair anim, AnimationClip newClip)
    {
        AnimatorOverrideController ov_ctrl = new AnimatorOverrideController();

        ov_ctrl.runtimeAnimatorController = anim.animator.runtimeAnimatorController;
        ov_ctrl [anim.getClip()]          = newClip;
        anim.setClip(newClip);
        anim.animator.runtimeAnimatorController = ov_ctrl;
    }
 void initAnimClipPairs()
 {
     Hat.setClip(AnimationControllers.AnimControllers.defaultClip);
     Hair.setClip(AnimationControllers.AnimControllers.defaultClip);
     Eyewear.setClip(AnimationControllers.AnimControllers.defaultClip);
     Mask.setClip(AnimationControllers.AnimControllers.defaultClip);
     Head.setClip(AnimationControllers.AnimControllers.defaultClip);
     Neck.setClip(AnimationControllers.AnimControllers.defaultClip);
     RHand.setClip(AnimationControllers.AnimControllers.defaultClip);
     LHand.setClip(AnimationControllers.AnimControllers.defaultClip);
     JSleeves.setClip(AnimationControllers.AnimControllers.defaultClip);
     Gloves.setClip(AnimationControllers.AnimControllers.defaultClip);
     Sleeves.setClip(AnimationControllers.AnimControllers.defaultClip);
     Arms.setClip(AnimationControllers.AnimControllers.defaultClip);
     Jacket.setClip(AnimationControllers.AnimControllers.defaultClip);
     Bodysuit.setClip(AnimationControllers.AnimControllers.defaultClip);
     Torso.setClip(AnimationControllers.AnimControllers.defaultClip);
     Shoes.setClip(AnimationControllers.AnimControllers.defaultClip);
     Feet.setClip(AnimationControllers.AnimControllers.defaultClip);
     Pants.setClip(AnimationControllers.AnimControllers.defaultClip);
     Legs.setClip(AnimationControllers.AnimControllers.defaultClip);
 }
Exemple #4
0
 void initAnimClipPairs()
 {
     Body.setClip(AnimationControllers.AnimControllers.defaultClip);
 }