shirtMagica 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 MagicaClothV2

  • Zero 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:

  1. Instantiate ... Equipment is retrieved from the pool or instantiated.

  2. Initialize + Disable Auto Build ... MagicaCloth.Initialize() and MagicaCloth.DisableAutoBuild() are called on every MagicaCloth component in the equipment. This prevents the cloth simulation from starting with the original prefab bones.

  3. Bone Remapping ... Character Creator remaps the equipment's bones to the player skeleton (the normal equip flow).

  4. Reparent Colliders ... Any MagicaCloth2.ColliderComponent instances are reparented to matching bones on the player skeleton so collision shapes follow the character correctly.

  5. Replace Transform + Build And Run ... MagicaCloth.ReplaceTransform(playerBoneDictionary) is called to update all bone references inside each cloth component, then MagicaCloth.BuildAndRun() starts the simulation with the correct bones.

This follows the same pattern as Magica Cloth 2's official RuntimeDressUpDemo.

Setup

  1. Install Magica Cloth 2 in your Unity project.

  2. Add MagicaCloth components to your equipment prefabs as usual.

  3. 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 MagicaClothV2 assembly must be present).

  • MagicaCloth components should be on the equipment prefab (not on the character).

  • The equipment prefab must use bone-remapped equipping (the default BoneMapping mode, not ParentToBone).

Troubleshooting

Problem
Likely Cause
Fix

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

  • Assets/Arawn/CrystalCharacterCreator/Runtime/MagicaClothReflection.cs

  • Assets/Arawn/CrystalCharacterCreator/Runtime/EquipmentManager.cs

Last updated