I have a reasonably complex skinned model. After dragging the prefab onto the scene I’m planning to put capsule colliders around some of the bones. There are also 4 animations in the prefab, as well as materials etc.
Say I want to adjust one of the animations in Blender and be able to use the resulting edited animation with the prefab, is there any way to do this? In other words can I keep the capsule colliders on the armature, but get the armature to use the Blender edited animation?
If this cannot be done directly in the prefab, is there a workaround? For example, could I import the edited animation in a separate prefab and use that in the original model manually?
Hope this made some sort of sense, I’m a bit confused. However, it is going to be a major pain if I have to reapply all the bone collision capsules each time.
Just update the fbx containing your animation. The prefab will use the updated content.
Yes ^ ^ ^ the above… but there are limitations. Generally you cannot ADD new items, only change existing items. Here’s why:
Any arbitrary FBX model (including Blender files automatically imported as FBX files in Unity) is a collection of things:
- each object becomes a GameObject
- each might have a mesh
- each might generate / use materials
- there are parent/child relations between objects
The collective bunch of things is imported and given Unity-side names (called GUIDs) based on their Blender / FBX names and relationships.
When you drag it into Unity and make a prefab, a Prefab is just a collection of stuff linked together.
If you change a mesh in the Blender file the Prefab will just start using it.
However if you change the “Shape” of your hierarchy, that changes the internal naming, breaking your prefab.
Experiment!
Thanks for the replies - sorry for the lateness.
I re-imported the fbx with fixed animation and it worked fine. Just to clarify I’ve understood Kurt-Dekker - I could change a bone position, or even add a bone, in the blender armature and there would be no problem. And yes, no doubt I will end up having to experiment in the end, but not as long as everything’s working.