CoreComponent

Overview

CoreComponent is the base class of RenderDeformer / VirtualDeformer / BoneCloth / BoneSpring / MeshCloth / MeshSpring / Avatar.

 


public void ReplaceComponentBone(Dictionary<Transform, Transform> boneReplaceDict)

Swaps the component bones.
This is the function for changing the dress.
Normally, dress up is implemented by Avatar / AvatarParts.
If you don’t want to use them and want to implement your own dress up, you can use this function to implement the bone swapping of MagicaCloth components.

The original bone and the bone to be replaced are stored in pairs in the dictionary and passed.
For example, if the original bones of the skirt are (a, b, c) and you want to replace them with (A, B, C), the contents of the dictionary would be:

var boneReplaceDict = new Dictionary <Transform, Transform> ();
dict.Add (a, A);
dict.Add (b, B);
dict.Add (c, C);