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

Sprite.AddBlendShapeFrame

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 int AddBlendShapeFrame(int shapeIndex, float frameWeight, NativeArray<SpriteBlendShapeVertex> vertices);

Parameters

Parameter Description
shapeIndex The index of the blend shape.
frameWeight The weight of the new frame.
vertices The array of blend shape vertices for the frame.

Returns

int The index of the newly created frame (0-based).

Description

Adds a frame to the specified blend shape and returns the index of the newly created frame.

You can only add frames to the most recently created blend shape. You must add frames in increasing weight order for blend shapes that have multiple frames.