void SortBlendshapeFrames(BlendShape blendShape) { if(blendShape) { List<BlendShapeFrame> frames = blendShape.frames.ToList(); frames.Sort( (a,b) => { return a.weight.CompareTo(b.weight); } ); blendShape.frames = frames.ToArray(); } }