- Home /
Script generated mesh with blendshapes gets messed up when uvs are added
I'm creating a mesh asset using an editor script. I just create a mesh with new Mesh(), set mesh.vertices, mesh.triangles, mesh.normals, and add a bunch of blendshapes using mesh.AddBlendShapeFrame() (adding in a weight of 1, and the delta vertices and normals, and setting delta tangents to null). This works as expected. However, once I set mesh.uv, everything is messed up on the blendshapes. The default mesh looks fine, but once I add some weight to one of the blendshapes, the uvs AND the vertex positions get messed up, so somehow adding uvs is changing the delta vertices of the blendshapes? I dunno what's going on. I tested it on a standard material to be sure my custom shader wasn't the problem.
Your answer
Follow this Question
Related Questions
How do I know if a clicked vertex is contained in a blendshape? 0 Answers
Importing Blender Object Splits Mesh Into 4 1 Answer
Blendshapes do not change mesh in inspector. 1 Answer
SkinnedMeshRenderer: Change Bones at start without changing mesh or blendshape results. 0 Answers
Unity cam problem 1 Answer