GetBlendShapeWeight(int)
Gets the weight of a blend shape for this renderer.
Read time 1 minuteLast updated 4 days ago
Definition
- Type: Method
- Namespace: UnityEngine
- Assembly: UnityEngine.CoreModule
public float GetBlendShapeWeight(int index)
Parameters
The index of the blend shape with the weight you want to get. must be smaller than the Sprite.blendShapeCount of the sprite attached to this renderer.
IndexReturns
Type | Description |
|---|---|
| float | The weight of the blend shape. |
Remarks
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: SpriteRenderer.SetBlendShapeWeight.