Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


AddBlendShapeFrame(int, float, NativeArray<SpriteBlendShapeVertex>)

Adds a frame to the specified blend shape and returns the index of the newly created frame.
Read time 1 minuteLast updated 4 days ago

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule
public int AddBlendShapeFrame(int shapeIndex, float frameWeight, NativeArray<SpriteBlendShapeVertex> vertices)

Parameters

shapeIndex

The index of the blend shape.

frameWeight

The weight of the new frame.

The array of blend shape vertices for the frame.

Returns

Type

Description

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

Remarks

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.