I have a system where I instantiate characters at run time, assembling the components and sub-objects based on several different criteria. This means I can’t possibly manually set up the Locomotion system for every character that I will instantiate. However, each character, despite using different meshes, materials, and other scripts, will all have the same named bones, and will be able to use the same animations. So I’d like to be able to configure the locomotion system just once at design time and apply that somehow to each character as it’s made. We’d also like to avoid having to re-do all the locomotion settings when we add new character meshes to the game.
We will probably start with one of several prefabs that contains a hierarchy of meshes, and then add components at run time to customise it further. Is it somehow possible to copy the pre-configured locomotion components and data from somewhere at this stage? Perhaps from another prefab, or an invisible object? Or is there another good approach we haven’t thought of?