Changing character models at runtime.

Somosky

Member
I'm running into a problem and was wondering if you could help out.

I'm using two Synty Packs for my player character. If you aren't familiar with Synty the way they package their prefab for their packs they have a prefab with all their characters in that pack as children so you can easily acrivate/disable the skin meshed renderer of the character you want to use.

The issue I'm running into is I've created a prefab with two of these Synty packs "City" and "Gang Warfare" and created a Opsive Third Person Character and have the "City" character the active character and the "City " character Avatar set in the animation controller and the "Gang Warefare" character disabled on the prefab. This works fine.

However I've created a simple script that on a button press I deactivated the "City" character and activate the "Gang Warfare " character and set the avatar in the Anination controller to the "Gang Warefare" avatar. This works except the IK no longer up works on the upper body. The characters arms no longer love. I've disabled the IK component on the character and that does fix the issue with the arms not animating but then I no longer have IK.

So I'm wondering does something happen to the character when you enter play mode so that the IK is set on the original avatar that is not being set when I switch the character/avatar? Sorry for the long question. I can make a short video if I worded this too difficult to understand. Thanks.
 
When some of the components initialize they may cache the bones so you'll need to setup one character per rig. If you don't want to do it manually through the editor this is a useful thread if you want to create it at runtime:

 
Top