- Home /
How to Change an Object's Mesh to another Object's Mesh via Code C#
Hi everyone, Is there a way to change an object's mesh to another object's mesh through code? Say like I have a square and a cylinder how would I be able to change the square's mesh to the cylinder's mesh?
Comment
Answer by Eric5h5 · Oct 21, 2012 at 04:50 AM
object1.GetComponent<MeshFilter>().sharedMesh = object2.GetComponent<MeshFilter>().sharedMesh;