This isn't something I personally need as I won't be storing mesh data via Easy Save, but noticed it anyway. The blend shapes of meshes aren't serialised and deserialised. These are settable via
Mesh.AddBlendShapeFrame, and gettable by iterating over the
Mesh.GetBlendShape* functions
Mesh.blendShapeCount times. These aren't the same thing as the blend shape
weights which are accessible via
SkinnedMeshRenderer and
are serialised - the blend shapes specify a modification to make to the mesh (e.g. raising the corners of the mouth into a smile) and the weights control the intensity of the effect of that modification (e.g. 0.0 to not smile, 0.5 to smile a bit, and 1.0 to smile a lot) as it's currently displayed.
I believe this is the cause of a
Code: Select all
The number of blend shape weights we are loading does not match the number of blend shapes in this SkinnedMeshRenderer's Mesh
error when loading a previously-serialised game object with a skinned mesh featuring blend shapes.
Side note: I'd suggest adding a [c] tag for inline monospaced code. It's pretty common on forums that deal with programming so shouldn't surprise anyone, and is only a few clicks in phpBB (although I can't remember what those clicks are off the top of my head).