- Home /
Copy the exact "state" of an Animator / RuntimeAnimatorControler to another Object
I do have a human with an animator already in the scene. I am adding a second object (dress) to the scene at runtime. dress is having the same rig. I do want it to execute exactly the same movements a the human does.
Here is what I got at the moment:
Animator humanAnimator = human.GetComponent ("Animator") as Animator;
Animator dressAnimator = nextDress.GetComponent("Animator") as Animator;
dressAnimator.runtimeAnimatorController = humanAnimator.runtimeAnimatorController;
What I do not know is how to transfer the "state" of the Animator. The Animator-Class seems to have some functions like Animator.GetCurrentAnimationClipState, but nothins that seems to set those values. Am I missing something?
[PS: I have seen some answers here for clothings in general. They seem to depend on Unity Pro, which I am not using. And, be it as it may, it is the specific problem of getting and setting the state of an Animator/RuntimeAnimatorController that begins to bug me out...]
Your answer
Follow this Question
Related Questions
2D Animation does not start 1 Answer
Creating new rigged clothing for existing character prefab 1 Answer
How to make more than one animation with the animator? 0 Answers
Baked Animation VS Bezier Tween 0 Answers
why I have to anim.getComponent in update() function when I had done in Start () function 2 Answers