Anima2D.SpriteMeshCache.DeleteBlendShape C# (CSharp) Method

DeleteBlendShape() public method

public DeleteBlendShape ( BlendShape blendshape, string undoName = "" ) : void
blendshape BlendShape
undoName string
return void
		public void DeleteBlendShape(BlendShape blendshape, string undoName = "")
		{
			if(blendshape)
			{
				RegisterUndo(undoName);

				selectedBlendshape = null;
				blendshapes.Remove(blendshape);

				RegisterObjectUndo(blendshape, undoName);

				foreach(BlendShapeFrame frame in blendshape.frames)
				{
					DestroyObjectImmediate(frame);
				}

				DestroyObjectImmediate(blendshape);

				m_DirtyVertices = true;
				isDirty = true;
			}
		}

Usage Example

示例#1
0
 void DeleteBlendshape()
 {
     if (spriteMeshCache)
     {
         spriteMeshCache.DeleteBlendShape(spriteMeshCache.selectedBlendshape, "Delete BlendShape");
     }
 }