Blend Shapes Preset Manager
v4.0
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.
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.
blendShapesPresetManager.StartTransitionToPreset(0); // Transition to the first preset
blendShapesPresetManager.StartTransitionToPreset("Random"); // Transition to the "Random" preset.
Last updated
Was this helpful?