Skip to content

API Overview

This page provides a structured overview of the CharacterCustomization class and its public methods. It is intended as developer documentation for integrating and extending character customization functionality.


🔄 Character Switching

Switch character settings by index

void SwitchCharacterSettings(int settingsIndex)

Parameter
Type
Description
Default
settingsIndex
int
Switch character settings to load
-


Usage Example (Api Examples/Switch Character Settings)


🔨 Initialization

Initialize character by settings

void InitializeMeshes(CharacterSettings newSettings = null)

Parameter
Type
Description
Default
newSettings
CharacterSettings
New character settings to load
null

Initialize body colors

void InitColors()

🪢 Mesh & Bounds

Update bounds for all character meshes

void UpdateSkinnedMeshesOffscreenBounds()

Recalculate all blend shapes

void RecalculateShapes()

🔷 Blend Shapes & LOD

Set body shape (blend shapes)

void SetBlendshapeValue(CharacterBlendShapeType type, float weight, string[] forPart = null, CharacterElementType[] forClothPart = null)

Parameter
Type
Description
Default
type
CharacterBlendShapeType
Body type
null
weight
float
Weight (0 to 100)
0
forPart
string[]
Apply to specific body parts
null
forClothPart
CharacterElementType[]
Apply to specific cloth parts
null

Change LOD level

void ForceLOD(int lodLevel)

Parameter
Type
Description
Default
lodLevel
int
LOD level (0-3), <0 disable LODs
-

Change the number of LODs

void SetLODRange(int minLod, int maxLod)

Recalculate LODs

void RecalculateLOD()

🧩 Elements & Parts

Set character element

void SetElementByIndex(CharacterElementType type, int index)

Parameter
Type
Description
Default
type
CharacterElementType
Type of clothes
-
index
int
Element index
-


Usage Example

Clear character element

void ClearElement(CharacterElementType type)

Parameter
Type
Description
Default
type
CharacterElementType
Element type to clear
-

Set character height

void SetHeight(float height)

Parameter
Type
Description
Default
height
float
Character height
-

Usage Example (Api Examples/Set Height)

Set character head size

void SetHeadSize(float size)

Parameter
Type
Description
Default
size
float
Head size
-

Usage Example

Set character feet offset

void SetFeetOffset(Vector3 offset)

Parameter
Type
Description
Default
offset
Vector3
Feet offset for tall shoes
zero

Get clothes anchor

void GetClothesAnchor(CharacterElementType type)

Parameter
Type
Description
Default
type
CharacterElementType
Mesh anchor for clothes type
null

Get character part by name

void GetCharacterPart(string name)

Parameter
Type
Description
Default
name
string
Character part name
""

Get all character meshes by LOD level

void GetAllMeshesByLod(int lod)

Parameter
Type
Description
Default
lod
int
LOD index
-

Get all character meshes

void GetAllMeshes()

Hide character parts

void HideParts(string[] parts)

Parameter
Type
Description
Default
parts
string[]
Array of parts to hide
-

Unhide character parts

void UnHideParts(string[] parts, CharacterElementType hidePartsForElement)

Parameter
Type
Description
Default
parts
string[]
Parts to unhide
-
hidePartsForElement
CharacterElementType
Hide parts for this cloth type
-


🎨 Colors & Materials

Reset body colors to default values

void ResetBodyColors()

Reset body material to default

void ResetBodyMaterial()

Set body color by type

void SetBodyColor(BodyColorPart bodyColorPart, Color color)

Parameter
Type
Description
Default
bodyColorPart
BodyColorPart
Body part to change color
-
color
Color
New color
-

Get the used color of a body part

Color GetBodyColor(BodyColorPart bodyColorPart)

Parameter
Type
Description
Default
bodyColorPart
BodyColorPart
Body part
-


🧬 Setup & Serialization

Set character setup

void SetCharacterSetup(CharacterCustomizationSetup setup)

Parameter
Type
Description
Default
characterCustomizationSetup
CharacterCustomizationSetup
Character setup object
-

Generate setup class from current character

CharacterCustomizationSetup GetSetup()

Apply saved data to character

void ApplySavedCharacterData(SavedCharacterData data)

Parameter
Type
Description
Default
data
SavedCharacterData
Saved character data
-

Load character from file

void LoadCharacterFromFile(string path)

Parameter
Type
Description
Default
path
string
File path
-

Save character to file

void SaveCharacterToFile(CharacterCustomizationSetup.CharacterFileSaveFormat format, string path = "", string name = "")

Parameter
Type
Description
Default
format
CharacterFileSaveFormat
Save format
json
path
string
Directory path
-
name
string
File name
-

Get list of saved characters

List<SavedCharacterData> GetSavedCharacterDatas(string path = "")

Parameter
Type
Description
Default
path
string
Directory path
-

Delete all character saves

void ClearSavedData()

🧱 Mesh Combination

Combine all parts to a single mesh (includes LODs)

void BakeCharacter(bool usePreBuiltMeshes = false)

Parameter
Type
Description
Default
usePreBuiltMeshes
bool
Use pre-built meshes
false

Clear all combined meshes and enable customization mode

void ClearBake()

Check if character is baked

bool IsBaked()

🧰 Utilities

Get all character settings selectors

List<CharacterSettingsSelector> GetCharacterSettingsSelectors()

Reset all character changes

void ResetAll(bool ignore_settingsDefaultElements = true)

Parameter
Type
Description
Default
ignore_settingsDefaultElements
bool
Ignore default elements from settings
true

Randomize character appearance

void Randomize()

Get character's Animator component

Get character's Animator component
Animator GetAnimator()

🎭 Emotions & Animations

Play a blendshape animation

void PlayBlendshapeAnimation(string animationName, float duration = 1f, float weightPower = 1f)

Parameter
Type
Description
Default
animationName
string
Animation name
-
duration
float
Animation duration
1.0f
weightPower
float
Animation power
1.0f

Stop all emotions (blendshape animations)

void StopBlendshapeAnimations()

📦 Presets

Get element preset

CharacterElementsPreset GetElementsPreset(CharacterElementType type, int index)

Parameter
Type
Description
Default
type
CharacterElementType
Preset type
-
index
int
Preset index
-

Get all element presets by type

List<CharacterElementsPreset> GetElementsPresets(CharacterElementType type)

Parameter
Type
Description
Default
type
CharacterElementType
Preset type
-


🧩 Need examples or usage snippets? Consider checking the documentation or API examples section.