HeroBridge API

Appearance API

Apply presets, colors, expressions, and body blendshape values from code.

API: Presets, Colors, and Expressions

Presets

csharp
sidekick.SetPresetHead(string presetName);
sidekick.SetPresetUpperBody(string presetName);
sidekick.SetPresetLowerBody(string presetName);
sidekick.SetPresetBodyShape(string presetName);
sidekick.SetPresetColorSpecies(string presetName);
sidekick.SetPresetColorOutfits(string presetName);

Preset names are defined in Presets.json. For example:

csharp
sidekick.SetPresetHead("Species Humans 01");

Colors

csharp
sidekick.SetColorValue(string value);
sidekick.SetColorProperty(string colorPropertyName);

Set a color with an HTML color string, such as #FFAA00 or #FFAA00FF, then apply it to a property such as Skin Color or Hair Color.

Expressions

csharp
sidekick.SetExpressionTransition(float value);
sidekick.SetEmotion(string emotion);
sidekick.RestoreEmotionAfterChange();
var emotion = sidekick.CurrentEmotion;

Set the transition duration in seconds, then choose an expression such as Happy, In Pain, or Neutral. CurrentEmotion returns the active expression, or Neutral when none is active.

Body Blendshapes

csharp
sidekick.SetBodyType(float value);
sidekick.SetBodySize(float value);
sidekick.SetMusculature(float value);

Body Type and Musculature use values from 0 to 100. Body Size uses values from -100 to 100.