Hi. What is the procedure to adopt when animating a character which will have attached on itself swappable props?
(This assumes a 3D or 2D skeleton-based character.) Create attachment points (aka mount points) -- empty GameObjects that are children of the appropriate bones (GameObjects) in the character's skeleton. For example, add an attachment point to the character's hand for hand-held props, and another to the character's head for hats. When you attach a prop, make it a child of the attachment point (e.g., using transform.SetParent()). You can position the attachment points so that props are added at just the right position and rotation.
It is a 3d skeleton based character. Ok, after creating the attachment points (er... how to do this? And, sjhould I create 'em also on the swappable props?), I must animate the character in the package, or import it in U3d and animate it with mechanim. Then the added prop will follow the distortion of the host mesh. Right?
My previous post assumed you were talking about rigid props such as weapons, helmets, etc. (See ootii's Mount Points for a formal, commercial implementation of this concept. It's a good product and can save you time, but even if you don't use it you can get a good idea of the concept by watching.) You typically don't need to create an attachment point for the prop itself. Just make sure the prop's origin (0,0,0) is positioned where it will connect to thee attachment point. For flexible props, such as cloth, that need to conform to the shape of the model, you'll have to rig those to the skeleton, typically in your 3D modeling/animation software. They'll be separate meshes that you can activate and deactivate as the character changes outfits.
Yes, it was meant for rigid objects. TY so far. And... What if I have a character which is made up by three pieces (body, prop 1 and 2), of which the prop1 is already attached on body in unity (the two parts are modeled and textured separately, aswell as prop2),and prop2 is held into prop1, but can be extracted from it (such as a sword, a gun &c). Should I rig the body i an external animator app, with already the 1 attached to it, and treat 2 as a object mounted in 1 with mounting points?
Since it's probably easier to rig and animate in an external app rather than in Unity, you should probably do that. The main reason to connect things in Unity is so you can connect and disconnect programmatically at runtime.