# Blend Shapes Preset Manager

{% embed url="<https://www.youtube.com/watch?v=afUwR50zklc>" %}

## Set a preset at runtime

You can instantly set the values of a preset at runtime using its name or index. Values that are set to "random" will be randomly generated at this point.

```csharp
blendShapesPresetManager.ActivatePreset(0); // Set to the first preset
blendShapesPresetManager.ActivatePreset("Random"); // Set to the "Random" preset.
```

## Transition to a preset at runtime

You can also transition over time to a preset. This is the same end result, but rather than setting it instantly, the change will happen in the timeframe you set in the Inspector.

```csharp
blendShapesPresetManager.StartTransitionToPreset(0); // Transition to the first preset
blendShapesPresetManager.StartTransitionToPreset("Random"); // Transition to the "Random" preset.
```


---

# Agent Instructions: 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:

```
GET https://infinitypbr.gitbook.io/magic-pig-games/equipment-systems/blend-shapes-preset-manager.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
