> For the complete documentation index, see [llms.txt](https://docs.fullscreen.no/info/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fullscreen.no/info/standalone-assets/herobridge-standalone/api.md).

# API

### HeroBridge Standalone API Reference

All examples assume you already have a reference to a `SidekickCharacter` component.

```cs
SidekickCharacter sidekick = characterGameObject.GetComponent<SidekickCharacter>();
```

***

### Configuration

```csharp
/// <summary>
/// Enables or disables rebuilding the Animator hierarchy when applying parts.
/// </summary>
/// <param name="value">
/// True to rebuild the Animator root (recommended default behavior).
/// False to confirm the Animator reference without rebuilding.
/// </param>
sidekick.SetRebuildAnimatorRoot(bool value);
```

```csharp
/// <summary>
/// Sets whether the character body should be reset before applying new parts.
/// </summary>
/// <param name="value">
/// When true, parts not included in the new setup are removed.
/// When false, existing parts that are not overridden remain.
/// </param>
sidekick.SetResetBody(bool value);
```

```csharp
/// <summary>
/// Enables or disables automatic matching of symmetrical parts.
/// </summary>
/// <param name="value">
/// When enabled, matching left/right parts are applied if available.
/// </param>
sidekick.SetUseMatchingParts(bool value);
```

```csharp
/// <summary>
/// Enables or disables including a None option when cycling parts.
/// </summary>
/// <param name="value">
/// When enabled, cycling can remove the current part.
/// </param>
sidekick.SetIncludeNone(bool value);
```

***

### Parts

```csharp
/// <summary>
/// Applies one or more Sidekick parts to the character.
/// </summary>
/// <param name="partValue">
/// A part identifier or a comma-separated list of identifiers.
/// Example:
/// "SK_HUMN_BASE_01_01HEAD_HU01"
/// "SK_HUMN_BASE_01_01HEAD_HU01,SK_HUMN_BASE_01_02HAIR_HU01"
/// </param>
sidekick.SetPart(string partValue);
```

```csharp
/// <summary>
/// Removes the currently equipped part for a specific part type.
/// </summary>
/// <param name="partType">
/// The part type name, such as "Hair", "Head", or "Torso".
/// Type names are PascalCase without spaces.
/// </param>
sidekick.RemovePart(string partType);
```

***

### Cycling Parts

```csharp
/// <summary>
/// Cycles to the next available part of the specified type.
/// </summary>
/// <param name="partType">
/// The part type to cycle, such as "Hair" or "Head".
/// </param>
sidekick.CycleNext(string partType);
```

```csharp
/// <summary>
/// Cycles to the previous available part of the specified type.
/// </summary>
/// <param name="partType">
/// The part type to cycle, such as "Hair" or "Head".
/// </param>
sidekick.CyclePrevious(string partType);
```

```csharp
/// <summary>
/// Selects a random part from the available parts of the specified type.
/// </summary>
/// <param name="partType">
/// The part type to cycle, such as "Hair" or "Head".
/// </param>
sidekick.CycleRandom(string partType);
```

***

### Presets

```csharp
/// <summary>
/// Applies a Head preset by name.
/// </summary>
/// <param name="presetName">
/// The preset name as defined in Presets.json.
/// Example: "Species Humans 01".
/// </param>
sidekick.SetPresetHead(string presetName);
```

```csharp
/// <summary>
/// Applies an Upper Body preset by name.
/// </summary>
sidekick.SetPresetUpperBody(string presetName);
```

```csharp
/// <summary>
/// Applies a Lower Body preset by name.
/// </summary>
sidekick.SetPresetLowerBody(string presetName);
```

```csharp
/// <summary>
/// Applies a Body Shape preset by name.
/// </summary>
sidekick.SetPresetBodyShape(string presetName);
```

```csharp
/// <summary>
/// Applies a Species color preset by name.
/// </summary>
sidekick.SetPresetColorSpecies(string presetName);
```

```csharp
/// <summary>
/// Applies an Outfit color preset by name.
/// </summary>
sidekick.SetPresetColorOutfits(string presetName);
```

***

### Colors

```csharp
/// <summary>
/// Sets the color value that will be applied to a Sidekick color property.
/// </summary>
/// <param name="value">
/// An HTML color string such as "#FFAA00" or "#FFAA00FF".
/// </param>
sidekick.SetColorValue(string value);
```

```csharp
/// <summary>
/// Applies the previously set color to a specific Sidekick color property.
/// </summary>
/// <param name="colorPropertyName">
/// The name of the color property, such as "Skin Color" or "Hair Color".
/// </param>
sidekick.SetColorProperty(string colorPropertyName);
```

***

### Expressions

```csharp
/// <summary>
/// Sets the transition duration used when changing facial expressions.
/// </summary>
/// <param name="value">
/// Transition duration in seconds.
/// </param>
sidekick.SetExpressionTransition(float value);
```

```csharp
/// <summary>
/// Applies a facial expression to the character.
/// </summary>
/// <param name="emotion">
/// The expression name, such as "Happy", "In Pain", or "Neutral".
/// </param>
sidekick.SetEmotion(string emotion);
```

```csharp
/// <summary>
/// Restores the current facial expression after a part or preset change.
/// </summary>
sidekick.RestoreEmotionAfterChange();
```

```csharp
/// <summary>
/// Gets the name of the currently active facial expression.
/// </summary>
/// <returns>
/// The current emotion name, or "Neutral" if none is active.
/// </returns>
string emotion = sidekick.CurrentEmotion;
```

***

### Body Blendshapes

```csharp
/// <summary>
/// Sets the Body Type blendshape value.
/// </summary>
/// <param name="value">
/// A value between 0 and 100.
/// </param>
sidekick.SetBodyType(float value);
```

```csharp
/// <summary>
/// Sets the Body Size blendshape value.
/// </summary>
/// <param name="value">
/// A value between -100 and 100.
/// </param>
sidekick.SetBodySize(float value);
```

```csharp
/// <summary>
/// Sets the Musculature blendshape value.
/// </summary>
/// <param name="value">
/// A value between 0 and 100.
/// </param>
sidekick.SetMusculature(float value);
```

***

### Saving and Loading

{% hint style="info" %}
**Note:**\
The character GameObject name is used as the unique ID when saving and loading.
{% endhint %}

```csharp
/// <summary>
/// Saves the character appearance to a save slot.
/// </summary>
/// <param name="saveslot">
/// The save slot index. The value is rounded to an integer.
/// </param>
sidekick.SaveCharacter(float saveslot);
```

```cs
/// <summary>
/// Loads the character appearance from a save slot.
/// </summary>
/// <param name="saveslot">
/// The save slot index. The value is rounded to an integer.
/// </param>
sidekick.LoadCharacter(float saveslot);
```

### Components

The following components support being triggered manually via an `Apply()` method.\
All of them require a reference to a **GameObject with a Sidekick Character component**.

* Sidekick Part Applier
* Sidekick Preset Applier
* Sidekick Expression Applier
* Sidekick Cycle Part
* Sidekick Save Load Applier
* Sidekick Part Icon Generator
* Sidekick Color Applier
* Sidekick Body Blendshape Applier

These components can be used with **Apply Mode set to On Invoke**, so you can control exactly when they execute.

#### Example: Calling Apply from code

```cs
/// <summary>
/// Applies the configured behavior of a Sidekick Applier component.
/// </summary>
SidekickBodyBlendshapeApplier applier = GetComponent<SidekickBodyBlendshapeApplier>();
applier.Apply();
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.fullscreen.no/info/standalone-assets/herobridge-standalone/api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
