Skip to main content

ClothesSettings

A class in Root.Township, Alta.Character.

The character dummy's clothing renderers (opaque and transparent, body and head) and helpers to swap their meshes and materials. Used by the cosmetic packer when building a character's look.

Constructors​

MemberWhat it is
ClothesSettings()Creates a ClothesSettings with default values.

Fields​

5 private and internal fields
MemberWhat it is
private SkinnedMeshRenderer[] headOpaqueClothesOpaque renderers on the head.
private SkinnedMeshRenderer[] headTransparentClothesTransparent renderers on the head.
private Renderer[] lod0Backing field for Lod0.
private SkinnedMeshRenderer[] opaqueClothesOpaque renderers on the body.
private SkinnedMeshRenderer[] transparentClothesTransparent renderers on the body.

Properties​

MemberWhat it is
Renderer[] Lod0 { get; }The LOD 0 renderers.
IEnumerable<Renderer> Renderers { get; }Every clothing renderer: head and body, opaque and transparent.
ICharacterDummySpecialEffects SpecialEffects { get; set; }Optional special effects handler initialised whenever clothing meshes are set.

Methods​

MemberWhat it is
void BakeMeshes(Mesh[] meshes, Mesh[] headMeshes, Mesh[] transparentMeshes, Mesh[] transparentHeadMeshes)Bakes each skinned clothing renderer's current pose into the matching passed mesh (vertices and normals).
void SetMaterialInstance(Material material)Sets the shared material on all opaque body and head clothes.
void SetOpaque(Mesh[] meshes, Mesh[] headMeshes)Assigns meshes to the opaque body and head renderers, disabling any with an empty mesh, then initialises special effects.
void SetTransparent(Mesh[] meshes, Mesh[] headMeshes)Assigns meshes to the transparent body and head renderers, disabling any with an empty mesh, then initialises special effects.
void SetTransparentMaterialInstance(Material material)Sets the shared material on all transparent body and head clothes.
void ToggleBodyRenderers(bool isEnabled)Shows body clothes normally or switches them to shadows only.
void ToggleHeadRenderers(bool isEnabled)Shows head clothes normally or switches them to shadows only (used to hide your own head from yourself).

Used in​

Members of other types that take, return or hold a ClothesSettings: