Skip to main content

CharacterDummy

A class in Root.Township, Alta.Character.

The visual character model: rig, animator, skin, clothes, eyes and LODs, used for players and customization previews. Reached through a CharacterDummyPointer, such as PlayerCustomizationHandler.CharacterDummy.

Constructors​

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

Fields​

13 private and internal fields
MemberWhat it is
private Animator animatorBacking field for Animator, the character's animator.
private BodyTypeSettings bodyTypeBacking field for BodyType.
private ClothesSettings clothesBacking field for Clothes, which also shows and hides the head and body renderers.
private CharacterComponentControllerCollection controllerCollectionBacking field for ControllerCollection.
private CosmeticPacker cosmeticPackerBacking field for CosmeticPacker.
private HashSet<Renderer> effectRenderersRenderers added with AddEffectRenderer, exposed as EffectRenderers.
private EyeSettings eyesBacking field for Eyes.
private FingerTipSettings fingerTipsBacking field for FingerTips.
private LODGroup lodGroupBacking field for LodGroup, the character's LOD group.
private HashSet<Renderer> mainRenderersThe clothes renderers, exposed as MainRenderers.
private RigMap rigMapBacking field for RigMap, which maps bone ids to transforms.
private BoneIdentifier rootBone id of the root bone, looked up in the rig map by Root.
private SkinSettings skinBacking field for Skin.

Properties​

MemberWhat it is
Animator Animator { get; }The character's animator.
BodyTypeSettings BodyType { get; }The body type settings.
ClothesSettings Clothes { get; }The clothes settings, which own the body and head renderers.
CharacterComponentControllerCollection ControllerCollection { get; }The character component controllers on this model.
CosmeticPacker CosmeticPacker { get; }Packs cosmetic meshes for this model.
IEnumerable<Renderer> EffectRenderers { get; }Extra renderers added for effects.
EyeSettings Eyes { get; }The eye settings; cleaned up when the model is destroyed.
FingerTipSettings FingerTips { get; }Finger tip settings.
bool IsFirstPerson { get; private set; }Whether the model is in first person mode (head hidden).
LODGroup LodGroup { get; }The model's LOD group.
IEnumerable<Renderer> MainRenderers { get; }The clothes renderers.
PlayerCharacterCustomizationManager Manager { get; set; }The customization manager driving this model.
List<Renderer> Renderers { get; }Renderers in the first LOD level.
RigMap RigMap { get; }Map of the rig's bones.
Transform Root { get; }The root bone transform.
SkinSettings Skin { get; }The skin settings.

Methods​

MemberWhat it is
void AddEffectRenderer(Renderer renderer)Adds a renderer to the effect renderers list.
void SetCharacterBodyVisibility(bool isVisible)Shows or hides the body renderers.
void SetCharacterHeadVisibility(bool isVisible)Shows or hides the head renderers.
void SetFirstPerson(bool isFirstPerson)Sets first person mode, hiding the head renderers when on.
3 private and internal methods
MemberWhat it is
private void Awake()Collects the clothes renderers as main renderers and the first LOD's renderers into Renderers.
private void OnDestroy()Cleans up the eye settings.
private void ReduceLOD()Drops the top LOD level and hides its renderers, unless first person. Not called anywhere in this build.

Used in​

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