- Home /
Question by
Polymo · Aug 18, 2017 at 09:35 AM ·
meshskinnedmeshrenderersharedmesh
SkinnedMeshRenderer only has 'sharedMesh', no 'mesh', How to modify?
Hey, i noticed that the SkinnedMeshRenderer only has the sharedMesh property unlike meshfilter. Now, i want to assign it a new/modified mesh, but without sideeffects. Is this just an error in the naming, and i can use it the 'mesh'-way?
Comment
Best Answer
Answer by Bodhid · Aug 18, 2017 at 10:56 AM
In the scripting API SkinnedMeshRenderer only has sharedMesh indeed. You could duplicate the mesh and assign the duplicate to the skinnedmeshrenderer.
Mesh newMesh = Instantiate(oldMesh);
If that doesn;t work you could create a new mesh and copy the Verteces/uvs/normals