Magica Cloth 2 Integration
Crystal Character Creator automatically supports Magica Cloth 2 cloth simulation on equipped items. No configuration is required ... the integration is detected and activated at runtime when Magica Cloth 2 is installed.
The Problem
When equipment is instantiated, Magica Cloth captures bone orientations at OnEnable time. However, Character Creator remaps the equipment's bones to the player skeleton after instantiation. Without special handling, the cloth simulation would start with the wrong bone references, causing incorrect rotations and broken cloth behavior.
How It Works
Character Creator uses a reflection-based bridge to Magica Cloth 2, meaning:
No hard assembly reference ... the runtime DLL does not depend on
MagicaClothV2Zero configuration ... if Magica Cloth 2 is installed, integration is automatic
Safe no-op ... if Magica Cloth 2 is not installed, all integration calls are silently skipped
Equip Flow
When an equipment prefab with MagicaCloth components is equipped, the following happens:
Instantiate ... Equipment is retrieved from the pool or instantiated.
Initialize + Disable Auto Build ...
MagicaCloth.Initialize()andMagicaCloth.DisableAutoBuild()are called on everyMagicaClothcomponent in the equipment. This prevents the cloth simulation from starting with the original prefab bones.Bone Remapping ... Character Creator remaps the equipment's bones to the player skeleton (the normal equip flow).
Reparent Colliders ... Any
MagicaCloth2.ColliderComponentinstances are reparented to matching bones on the player skeleton so collision shapes follow the character correctly.Replace Transform + Build And Run ...
MagicaCloth.ReplaceTransform(playerBoneDictionary)is called to update all bone references inside each cloth component, thenMagicaCloth.BuildAndRun()starts the simulation with the correct bones.
This follows the same pattern as Magica Cloth 2's official RuntimeDressUpDemo.
Setup
Install Magica Cloth 2 in your Unity project.
Add
MagicaClothcomponents to your equipment prefabs as usual.Equip the item via Character Creator ... cloth simulation will work automatically.
There are no extra settings, checkboxes, or components to configure on the Character Creator side.
Requirements
Magica Cloth 2 must be installed in the project (the
MagicaClothV2assembly must be present).MagicaClothcomponents should be on the equipment prefab (not on the character).The equipment prefab must use bone-remapped equipping (the default
BoneMappingmode, notParentToBone).
Troubleshooting
Cloth simulation not working on equipped items
Magica Cloth 2 is not installed
Install the Magica Cloth 2 package
Equipment rotates incorrectly with cloth enabled
Old version of Crystal Character Creator without the reflection bridge
Update to the latest version
Cloth colliders not following the character
Collider components are on bones that don't exist in the player skeleton
Ensure collider parent bone names match the player skeleton bone names
Cloth works in prefab but not when equipped
Auto-build fires before bone remapping completes
This is handled automatically ... ensure you are using the latest version of Crystal Character Creator
Related Files
Assets/Arawn/CrystalCharacterCreator/Runtime/MagicaClothReflection.csAssets/Arawn/CrystalCharacterCreator/Runtime/EquipmentManager.cs
Last updated