Skip to main content

CharacterShellHelper

A class in Root.Township, the global namespace.

Editor script helper that builds a new character shell from a body rig, copying materials from an existing set of skinned meshes.

Constructors​

MemberWhat it is
CharacterShellHelper()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

1 private and internal field
MemberWhat it is
private SkinnedMeshRendererGroup existingGroupThe current shell's skinned mesh group. Disabled and replaced by CreateShell.

Methods​

MemberWhat it is
void CreateShell(Transform newBodyRoot)Duplicates the body root, keeps only the skinned meshes that match the existing group by name (with its materials), and swaps it in as the current group.
1 private and internal method
MemberWhat it is
private void RecursiveDelete(Transform transform, List<SkinnedMeshRenderer> renderersToIgnore)Destroys every skinned mesh object under a transform that isn't in the keep list.