Which components can be transferred between characters independent of character model or animations?

For my game I want to have several different characters with different:

- Sizes
- Animations
- Speeds
- Damage amounts
- Models
- Sounds

The characters will all share the same abilities (running, crouching, rolling, jumping etc) but they will each have a different animations for these abilities. How should I go about creating new characters and transferring over the abilities? Should I create the characters the normal way using the character manager or should just make a variant of the prefab with an animator override controller and a different model?

I guess my question is which components can be transferred between characters independent of character model or animations?
 
You should look into Unity's prefab variants feature. You can have a "base" character prefab which you use to modify all the characters' abilities, items, physics, etc., then have any number of variants of that prefab, each of which can have different models, animators, etc. Just be a bit careful to only edit the base character when you want to edit something that is shared between all characters (e.g. abilities).
 
You should look into Unity's prefab variants feature. You can have a "base" character prefab which you use to modify all the characters' abilities, items, physics, etc., then have any number of variants of that prefab, each of which can have different models, animators, etc. Just be a bit careful to only edit the base character when you want to edit something that is shared between all characters (e.g. abilities).
Sounds good, are there any script variables that need to change when you swap out the model?
 
Nope, having different models on each of the variants should just work.

One thing to look out for is the avatar/rig of each of the models. If they're all of the standard humanoid type then it should be fine, but if you see any weird animation issues (with bone targeting/positioning) then you may need to check that the avatar for the Animator + animations + model all match up.
 
When you are using the Character Foot Effects, you have to manually reassign the feet to the component after swiping the model. Also, in case you are using Behavior Designer, the Behavior Tree component should be added only on the prefab variant, as you can't change the behavior tree otherwise.
 
When you are using the Character Foot Effects, you have to manually reassign the feet to the component after swiping the model. Also, in case you are using Behavior Designer, the Behavior Tree component should be added only on the prefab variant, as you can't change the behavior tree otherwise.
Sounds good, thanks. I also noticed that there's something called the capsule collider positioner script that has variables called First End Cap Target and Second End Cap Target. What does this script do and what should I put for the variables?
 
Good point. The script positions the central capsule collider for the character. The first end cap is the character transform (feet), the second cap should be set to the head. If the character changes height, the height of the capsule collider is recalculated and adjusted accordingly. If the second cap is not defined, the height is taken from the initial height of the capsule collider. I recommend assigning both character, and head transform. And you might also need to adjust the radius of the capsule collider depending on the diameter of your character.
 
Good point. The script positions the central capsule collider for the character. The first end cap is the character transform (feet), the second cap should be set to the head. If the character changes height, the height of the capsule collider is recalculated and adjusted accordingly. If the second cap is not defined, the height is taken from the initial height of the capsule collider. I recommend assigning both character, and head transform. And you might also need to adjust the radius of the capsule collider depending on the diameter of your character.
That's pretty cool that it does that automatically. Y'all think of everything.
 
Top