Version: Unity 6.5 Alpha (6000.5)
LanguageEnglish
  • C#

SpriteRenderer.SetBlendShapeWeight

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public void SetBlendShapeWeight(int index, float value);

Parameters

Parameter Description
index The index of the blend shape to modify. The index must be smaller than the Sprite.blendShapeCount of the sprite attached to this renderer.
value The weight for this blend shape.

Description

Sets the weight of a blend shape for this renderer.

The weight of a blend shape represents how much the sprite has been blended (or morphed) from its original shape to a target blend shape. The target blend shape is another sprite containing the same topology, but with different vertex positions than the original.

The blend shape weight range includes values between the minimum and the maximum weights defined in the sprite.

Additional resources: GetBlendShapeWeight.