Something weird this way comes. I'm using the Unity Third Person Starter assets package and all is good. I created a default Genesis 8 female character in Daz Studio and labeled it 'Human'. all other characters are copies of this default. The only differences are changing the head. All bones, skeletons are exactly the same.
If I manually switch a player mesh in the player Geometry game object of the Unity Third Person player and manually change the animator avatar, then run the game, the new mesh works perfectly.
Now the weirdness. If I programmatically change the mesh and avatar during runtime, animation doesn't kick in. BUT, if, during runtime, in the editor, I change the 'apply root motion', or update/culling modes, the animation does kick in with the new player mesh. BUT, BUT, if I make the changes to the animator with code during runtime, nothing happens. Something is going on under the covers in Unity which I don't know how to trigger. I tried player.animator.Rebind(), but no joy. Ideas?
I've been debugging for days. the code is simple. 1) destroy previous mesh in the geometry game object. 2) instantiate new game mesh in geometry game object. 3) assign avatar from the new game mesh to the player animator avatar. As I said, when I do this by hand, all works. When I do this with code, during runtime, nothing works until I click on the player avatar animator and change any field. So, I am missing some code which reactivates the player animator during runtime.
I've tried player.animator.Rebind(), enabling/disabling animator, third person controller, waiting periods of seconds and any combination thereof. Again, no joy.